Skip to content
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

FR: inline ignore comments #105

Open
chrisgrieser opened this issue Aug 7, 2024 · 2 comments
Open

FR: inline ignore comments #105

chrisgrieser opened this issue Aug 7, 2024 · 2 comments

Comments

@chrisgrieser
Copy link

In some cases, it might be useful to simply disable harper for a paragraph or a line. Most linters/LSPs allow for inline directives via comments, e.g. ---@diagnostic disable-next-line: {rulename} in the Lua LSP.

@bassamsdata
Copy link

It's true and a very useful feature.

It would also be helpful to add an inline directive for specific chunks, similar to how it's done in StyLua. For example:

-- stylua: ignore start 
-- whatever code or comments should be ignored by the linter
-- stylua: ignore end 

Additionally, to ignore an entire file, you can place -- stylua: ignore start at the beginning of the file.

Thank you

@elijah-potter
Copy link
Collaborator

elijah-potter commented Aug 8, 2024

This is similar to #102. While I like the stylua comments, I think the format they propose is much better (and plays nicer with JavaDoc's HTML and JsDoc's Markdown.

For reference:

<!-- markdownlint-disable-file MD033 -->

Before I move forward, I would like your thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants