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

Is it possible to lint code comments and/or docblocks? #322

Open
jgornick opened this issue Sep 14, 2021 · 2 comments
Open

Is it possible to lint code comments and/or docblocks? #322

jgornick opened this issue Sep 14, 2021 · 2 comments

Comments

@jgornick
Copy link

As the title says :)

I suppose one workaround for linting docblocks is linting any generated documentation from the docblocks.

Thank you!

@wooorm
Copy link
Member

wooorm commented Sep 18, 2021

nope, there’s not really support for that. Although, you can pass --text on the CLI to see the files you give it as plain text.
Alternatively, you could do the inverse based on what linter exists for your code, and integrate that to look for code comments, and run the alex API on those comments!

@boomshadow
Copy link

boomshadow commented May 7, 2023

I use a combination of fd (a find replacement) and what @wooorm suggested above to get Alex as a linter in my projects' CI/CD pipeline. I find all ruby files, then pass to Alex to be linted as text. Then I do another search for markdown files and lint them like normal:

fd -e rb -x alex --text {}
fd -e md -x alex {}

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

No branches or pull requests

3 participants