Ignore linting the .build/ai directory#314
Conversation
|
Thank you for contributing! 👋 |
| # We don't need to document every Sphinx config | ||
| docs/conf.py:D1 | ||
| # We don't need to document AI scripts | ||
| .build/ai/**:D1 |
There was a problem hiding this comment.
I'm not sure we want to do this. If it gets checked into source, it should be documented.
There was a problem hiding this comment.
Does nps honor .gitignore? is this "AI" stuff typically in .gitignore?
There was a problem hiding this comment.
is this "AI" stuff typically in .gitignore?
Yes, the .build dir is in .gitignore
I've created another PR to update our skills to create AI scripts in <repo-root>/.build/ai directory. If that change is approved, this will not be required.
There was a problem hiding this comment.
If nps doesn't honor .gitignore, updating it to do so would benefit human developers too.
There was a problem hiding this comment.
It does not. And while that may be useful, we should include a config option to explicitly include dirs / patterns if we choose to add that.
There was a problem hiding this comment.
What do other linters do?
- flake8 does not honor .gitignore: Feature: gitignore support PyCQA/flake8#638
- ruff has a
respect-gitignoreoption: https://docs.astral.sh/ruff/settings/#respect-gitignore
Justification
Copilot creates ad-hoc scripts in the project's
.build/aidirectory. This is causing linters (ni-python-styleguide, flake8) to flag issues in these scripts when run in the project even though we aren't checking in that code.Implementation
Ignore linting the
.build/aidirectory