-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
lll: support the exclude option #207
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
Comments
|
In any case, it would be useful to transparently allow the configuration of the underlying linters in the way they support it (i.e. not invent new config rules in |
Exactly the problem I have: it's impossible to make the comment line shorter. I feel a tiny stab or irony that I have to make the comment longer to ignore it with a
|
Same issue here, trying |
Currently there's example in readme for excluding certain patterns from linting. From README:
In case of long comments it would be:
Closing. |
Thanks @matoous, that works perfectly! This is my config, so you can see what to add directly to issues:
exclude-rules:
- linters:
- lll
source: "^// " |
* Do not publish directories with no specs This commit ensures that any directories without any specs in them are not published to Confluence. Prior to this commit these directories were being published, appearing in Confluence as pages without any content or subpages. This was distracting when trying to browse the published specs in Confluence. One example of this manifesting itself prior to this commit was if the Gauge [concept files][1] were put into their own concepts directory. As we only publish specs and not concepts to Confluence, having concepts in their own directory was leading to empty directory pages being published prior to this commit. The functional tests implementation code in this commit was lifted and shifted with only minor alterations from [the functional tests repo for core Gauge][2] (just like the existing functional test implementation code) - no point in reinventing the wheel. One other noteworthy thing is that the code to delete a page uses the low level [Go net http client][3], rather than the higher level [confluence-go-api client][4]. This is because there was a subtle bug with the confluence-go-api client (it was returning an error even after a successful delete, despite returning [the correct 204 status code][5]). It may be worth removing the confluence-go-api client altogether in a future pull request, as [minimising dependencies is generally a good thing][6]. [1]: https://docs.gauge.org/writing-specifications.html#concepts [2]: https://github.com/getgauge/gauge-tests [3]: https://pkg.go.dev/net/http [4]: https://github.com/Virtomize/confluence-go-api [5]: https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/#delete-a-page [6]: https://endjin.com/blog/2018/09/whose-package-is-it-anyway-why-its-important-to-minimise-dependencies-in-your-solutions * Remove unused import * Exclude long urls in comments from go linting As per: golangci/golangci-lint#207 (comment) * Bump plugin minor version
This only works for comments on top-level objects, as otherwise there is preceeding whitespace. And for some reason |
it should be |
I'd like to exclude comments from the
lll
output.lll
has the--exclude
flag I could use for that (https://github.com/walle/lll), but it doesn't seem to be supported by golangcli-lint.The text was updated successfully, but these errors were encountered: