Skip to content

panlint: Model problems as properties of lines#232

Merged
jrha merged 10 commits intoquattor:masterfrom
jrha:panlint_objects_problem
Feb 18, 2022
Merged

panlint: Model problems as properties of lines#232
jrha merged 10 commits intoquattor:masterfrom
jrha:panlint_objects_problem

Conversation

@jrha
Copy link
Member

@jrha jrha commented Dec 5, 2019

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.

@ned21
Copy link
Contributor

ned21 commented Dec 8, 2019

231 is merged so can you rebase this one now?

@jrha jrha force-pushed the panlint_objects_problem branch from dcae35b to 481b188 Compare December 9, 2019 09:59
@jrha
Copy link
Member Author

jrha commented Dec 9, 2019

Thanks, rebased on master.

@wdpypere
Copy link
Contributor

@jrha you have some conflicts here

@jrha
Copy link
Member Author

jrha commented Feb 13, 2020

😢 not again

jrha added 7 commits June 23, 2021 15:29
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
@jrha jrha force-pushed the panlint_objects_problem branch from 481b188 to a319522 Compare June 23, 2021 14:30
@jrha jrha added the panlint label Jun 23, 2021
@jrha
Copy link
Member Author

jrha commented Feb 16, 2022

@ned21 I've finally addressed your comments!
The Jenkins build doesn't run the Panlint tests, so I assume it is failing for other reasons.

@jrha jrha changed the title Panlint: Model problems as properties of lines panlint: Model problems as properties of lines Feb 16, 2022
@jrha jrha merged commit 6d05cf6 into quattor:master Feb 18, 2022
@jrha jrha deleted the panlint_objects_problem branch February 18, 2022 13:33
@jrha jrha added this to the 10.8 milestone Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants