panlint: Model problems as properties of lines#232
Merged
jrha merged 10 commits intoquattor:masterfrom Feb 18, 2022
Merged
Conversation
Contributor
|
231 is merged so can you rebase this one now? |
dcae35b to
481b188
Compare
Member
Author
|
Thanks, rebased on master. |
Contributor
|
@jrha you have some conflicts here |
Member
Author
|
😢 not again |
Specifically use in: - check_line_component_use - check_line_patterns - check_line_paths - check_line_methods Problems have ability to self-diagnose Problems are a property of Lines, rather than the other way around Ensure that check_line_patterns returns a list of Problems, which we want to check all of Don't diagnose
Ensure it returns a list of Problem objects
Ensure it returns a list of Problem objects
Ensure it returns a list of Problem objects
* Check that lines are returned by lint_line * Check that Line problems are Problem objects * Fix lint_file calls to lint_line * Add _assert_lint_line function * Use it rather than repeating the same pattern over and over. * Deal with problems as properties of a line * Diagnoses are a function of each problem.
…returns an update copy of the Line with problems Check problems with returned lines check_line_methods should also return modified lines
Lint file now returns lines with problems rather than a direct count, but we can still count them. * Wrap long lines in test_mvn_templates * Iterate over line problems, messages and diagnoses * Rename variables in main to reflect current usage
481b188 to
a319522
Compare
ned21
reviewed
Jun 28, 2021
Member
Author
|
@ned21 I've finally addressed your comments! |
ned21
approved these changes
Feb 16, 2022
This file contains hidden or 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
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.
This is the second part of the work started in #220.
It may be worth reviewing commit-by-commit, I have taken some care to ensure that each commit leaves the code-base in a working state with tests that pass.
Requires #231.