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

Walker/Linter refactoring #54

Merged
merged 3 commits into from
Dec 10, 2018
Merged

Walker/Linter refactoring #54

merged 3 commits into from
Dec 10, 2018

Conversation

mlin
Copy link
Collaborator

@mlin mlin commented Dec 10, 2018

  • add children property to all AST nodes, which will be useful for several reasons
  • streamline & speed up Walker/Linter, using children to simplify code and reduce duplicate traversals
  • simplify & correct UnusedCall linter

This way Walker doesn't need special knowledge of how to recurse beneath each node.
refactor Walker so that Linters usually don't have to worry about super method invocations (but have the option to, if they need to control recursive descent). This allows us to run most Linters 'concurrently' in one traversal of the AST, which is faster and more scalable.
@coveralls
Copy link

coveralls commented Dec 10, 2018

Pull Request Test Coverage Report for Build 245

  • 169 of 175 (96.57%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 94.648%

Changes Missing Coverage Covered Lines Changed/Added Lines %
WDL/Lint.py 15 16 93.75%
WDL/Tree.py 46 47 97.87%
WDL/Walker.py 72 73 98.63%
WDL/Expr.py 31 34 91.18%
Totals Coverage Status
Change from base Build 239: 0.04%
Covered Lines: 2016
Relevant Lines: 2130

💛 - Coveralls

@mlin mlin merged commit e586e6c into master Dec 10, 2018
@mlin mlin deleted the mlin-refactor-walker branch February 15, 2019 04:40
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