-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add lint checks for the archive repo (#412)
* Refactor lint checks to support optional kinds 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. * Expose the check kinds from the CLI 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. * Add test of using the --checks flag This shows that we can now just run a subset of the checks. * Add linting check for upper bounds on archives As per https://github.com/ocaml/opam-repository/wiki/Package-Archiving:-Plan#preliminaries-for-phase-2-from-infra-team-ci * Add lint for the x-reason-for-archiving field * Add lint checks for x-opam-repository-commit-hash-at-time-of-archiving * Avoid data fetch when not required by lint check 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. * Add --quiet flag for lint subcommand Prevents output that is noisome when running in large batches.
- Loading branch information
Showing
6 changed files
with
360 additions
and
50 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.