-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add lint checks for the archive repo #412
Open
shonfeder
wants to merge
9
commits into
ocurrent:master
Choose a base branch
from
shonfeder:411/archive-lint
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+360
−50
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shonfeder
force-pushed
the
411/archive-lint
branch
from
January 1, 2025 07:25
2e6794f
to
ab5e81f
Compare
Extends the Lint api to allow specifying sets of lint checks to run, allowing us to control which kinds of checks we run in a given case. The changes in this commit to not add any new checks, but in factoring out the checks into distinct sets, we do change the order in which lint errors are reported. The expectations for those tests are updated here accordingly.
Allows specifing subsets of the cli checks to run. Note that this commit only updates tests to adapt to the new help output on our existing erroneous CLI input tests. This all the content of tests stays the same. This helps to show that this CLI change does not break our existing API.
This shows that we can now just run a subset of the checks.
shonfeder
force-pushed
the
411/archive-lint
branch
from
January 1, 2025 07:27
ab5e81f
to
f9b0a96
Compare
I need to add another layer of logic here that will bypass fetching sources when we are doing the simpler set of checks, otherwise we waste a lot of http requests for no reason. I'll do that tomorrow. ✔️ |
Only some of our lint checks require fetching data. This adds predicates to record whether a set of checks requires fetching e.g., the newness of a package or its source code, and avoids those fetches when not needed.
Prevents output that is noisome when running in large batches.
This has been tested in the intended CI target: ocaml/opam-repository-archive#3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #411
To support using the tool in different contexts, this change also extends the
API and CLI to allow specifying groups of related lints to be run. The default
falls back to the current behavior. This may also be useful for down-streaming
the linting into publication tools.
I suggest reviewing by commit, at least initially, since the change sets are
all logically grouped. The diff is not as long as it looks, since 177 lines
are coming from the cram tests.