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

Implement find_errors and return LintMatches directly #35

Merged
merged 13 commits into from
Jan 30, 2022

Commits on Jan 29, 2022

  1. Implement lint and return LintError directly

    Instead of creating and then parsing a string with a regular expression,
    we can instead build and return a list of `LintError`s (a typed dict)
    directly and skip some indirection.
    
    I am not sure if `lint` is *supposed* to be overridden like this, but I
    do remember advocating for it a couple years ago when the change for a
    proper data structure for lint results was discussed. It just now
    happened to be a convenient way to implement end markers for the
    highlighted region.
    
    In this particular instance, it allows us to specify a full region for
    marking the error, where we now specify the entire match including the
    remainder of the comment instead of just the trigger word. This can be
    changed, of course, but I figured it wouldn't be a bad idea initially.
    FichteFoll committed Jan 29, 2022
    Configuration menu
    Copy the full SHA
    4e54272 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e0754a0 View commit details
    Browse the repository at this point in the history
  3. Determine row and col from match_region

    Since we need to track the region anyway, we might as well extract row
    and col from it.
    FichteFoll committed Jan 29, 2022
    Configuration menu
    Copy the full SHA
    cfb1cf4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a9c31d7 View commit details
    Browse the repository at this point in the history
  5. Add mark_message setting

    FichteFoll committed Jan 29, 2022
    Configuration menu
    Copy the full SHA
    c83427e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1575f09 View commit details
    Browse the repository at this point in the history
  7. Remove redundant line_col_base

    kaste authored and FichteFoll committed Jan 29, 2022
    Configuration menu
    Copy the full SHA
    8ea62b5 View commit details
    Browse the repository at this point in the history
  8. Do not change signature of run

    kaste authored and FichteFoll committed Jan 29, 2022
    Configuration menu
    Copy the full SHA
    99c0306 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f183c1b View commit details
    Browse the repository at this point in the history
  10. Clarify error_type detection

    kaste authored and FichteFoll committed Jan 29, 2022
    Configuration menu
    Copy the full SHA
    8b97421 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    26a5ea0 View commit details
    Browse the repository at this point in the history
  12. Extract line-offset computation

    kaste authored and FichteFoll committed Jan 29, 2022
    Configuration menu
    Copy the full SHA
    ad09fec View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    31ec751 View commit details
    Browse the repository at this point in the history