Comments (4)
How the output from HTMLCS_RUNNER.run() can be captured for further processing in either the puppeteer or the jsdom case.
That is currently my issue. I am using the script with both marionette and webdriver (using geckodriver). It runs, but I get null
as the return value. Is it printing it to the console or something?
I discovered this script is what pa11y uses to scan for accessibility. Maybe I can figure out how they are getting the information out of it.
from html_codesniffer.
I found the code in Contrib/PhantomJS/runner.js
. It is indeed printing the results to the console separated simply with vertical bars |
. The HTMLCS_Run.js
file in the same directory has a function that suggests it returns JSON, but I don't know how to use that. The HTMLCS_RUNNER.run
function says it takes a callback, but it doesn't use it. I was hoping I could just pass some callback to turn it all into JSON or something. Anyway, it looks like I'll have to patch it, since I don't find tricks for capturing the console output suitable for my needs.
from html_codesniffer.
Testaro (https://www.npmjs.com/package/testaro) runs HTMLCS (and other packages). Testaro captures the output of HTMLCS and integrates it into its own output. The code and README file of Testaro show how it does that.
from html_codesniffer.
@jrpool thank you for the link. Hopefully, I didn't take this issue too far off topic.
I wrote a new runner locally that actually returns a value, but then I realized the machinery at the heart of HTMLCS is like continuation passing style but without return values. I started adding returns
to the final expressions in all branches, but then work was over and I started drinking to cope with having to walk the graph manually.
I noticed many functions return false under some failure conditions, but otherwise they implicitly return null. I just want to get return values from the callbacks threaded through HTMLCS. Do you think a PR adding this while preserving backwards compatibility would be welcome? I'm sure I'm off topic now.
from html_codesniffer.
Related Issues (20)
- Why not make this open source HOT 2
- Angular Material autocomplete attribute causes HTML_CodeSniffer to not load errors/warnings HOT 1
- http://squizlabs.github.com/HTML_CodeSniffer/ will not work HOT 2
- Chrome extension language stuck in Japanese HOT 1
- Empty lang attribute detected as not well-formed
- Links to individual codes for WCAG2 online documentation HOT 1
- Release a new version on NPM?
- Only report navigation <link> elements outside of head
- Support the Shadow Dom and Web Components
- Permanent jitter in browser scroll HOT 2
- question to principle4.guideline4_1.4_1_2.h91.inputtext.name HOT 1
- How to run HTML_CodeSniffer inside Java code
- Add HTML_CodeSniffer as an ACT implementation for W3C HOT 1
- Define Errors, Warnings & Notices
- Support WCAG 2.2 HOT 3
- is this project deprecated? HOT 1
- Uncaught TypeError: o is undefined
- False positives for CJK named anchors
- Module not found: Error: Can't resolve 'fs'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html_codesniffer.