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

feat: Add lint cfg section handling include & exclude patterns #952

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jburnitz
Copy link

@jburnitz jburnitz commented Apr 7, 2024

What

Allow the .pint.hcl to support a lint section for statically defining what rule to analyze.

Why

The CI command supports includes and excludes, but forces the concept of delta-to-another-branch.
This several scenarios this simply doesn't work:

  1. When using merged_results_pipelines there is no delta to compare against
  2. Depending on the gitflow used, the target branch isn't always consistent

Additionally, when using linting as part of pre-commit, tracking the paths to the rules in pre-commit config seems like a muddling of responsibilities (the rules paths is a pint configuration, not a pre-commit one)

@jburnitz
Copy link
Author

jburnitz commented Apr 7, 2024

Associated issue: #631

@jburnitz
Copy link
Author

jburnitz commented Apr 9, 2024

@prymitive curious if you have any thoughts?

…Move CI config include & exclude validation logic into common code"
@@ -0,0 +1,9 @@
# This is an example config to be used when running pint as a linter

lint {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I like the idea of having multiple include/exclude options, we'll end up with

ci { include = [...] }
lint { include = [...] }
watch { include = [...] }

all having same values.
If we were to have another place to add include/exclude then both options should be moved to parser {} and used for all commands.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, as a user, I'd expect an ability to inherit a base set of paths, then add other exclusions or inclusions on a command-by-command basis.

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

Successfully merging this pull request may close these issues.

None yet

2 participants