New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lint output #391
Comments
Yes, it is possible. But I don't currently have the time to document it fully. There is a script wrapper that produces output to a predetermined file. You can see this here: Line 111 in 5ccd7fb
You can copy this pattern in your linting if you like. The arguments to the script are the name of the output file (the file extension is stripped off by the script to keep your rule lean), an optional The trace script records output to |
Thanks. What is "output file" in the context of a linter? |
"output file" might be "linted file". This is just a grouping convenience for the summary report; I use the draft name. In most cases, you want "draft-name-wg-protocol", so that the summary will show errors associated with that draft (and not a ✅). If you are linting multiple drafts, then you might need to build the reporting for each into the linting tool. I'd avoid that. You currently have: http-lint: $(drafts_xml) $(DEPS_FILES)
$(rfc-http-validate) -q -m sf.json $(filter-out $(DEPS_FILES),$^) It might make sense to do something like: http-lint: $(add-suffix .http-lint.txt,$(add-prefix .,$(drafts)))
.%.http-lint.txt: %.xml $(DEPS_FILES)
$(trace) $< -s http-lint $(rfc-http-validate) -q -m sf.json $<
@touch $@ |
OK, trying that - thx |
This is where I ended up: clean::
-rm -f .*.http-lint.txt
lint:: http-lint
rfc-http-validate ?= rfc-http-validate
.SECONDARY: $(drafts_xml)
.PHONY: http-lint
http-lint: http-lint-install $(addsuffix .http-lint.txt,$(addprefix .,$(drafts)))
.PHONY: .%.http-lint.txt
.%.http-lint.txt: %.xml $(DEPS_FILES)
$(trace) $< -s http-lint $(rfc-http-validate) -q -m sf.json $<
@touch $@
.PHONY: http-lint-install
http-lint-install:
@hash rfc-http-validate 2>/dev/null || pip3 install rfc-http-validate |
You can add |
Currently, the github action markdown summary shows the output of the build process; e.g.,
https://github.com/httpwg/http-extensions/actions/runs/5284538905
Is it possible for an extension linter to also write to this?
(and, is there any documentation to help people writing things like linters?)
The text was updated successfully, but these errors were encountered: