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

propagate endLine/endColumn #167

Merged
merged 5 commits into from
Apr 9, 2024
Merged

propagate endLine/endColumn #167

merged 5 commits into from
Apr 9, 2024

Commits on Apr 9, 2024

  1. writer-json-sarif: write only valid region objects

    If no line number is available, skip writing of the `region` object
    in order not to break validation of the resulting SARIF format.
    
    Related: csutils#167
    kdudka committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    1d29439 View commit details
    Browse the repository at this point in the history
  2. json-{sarif,simple}: propagate endLine/endColumn

    Initially csdiff supported only startLine/startColumn.  Some scanners
    provide also endLine/endColumn to denote a region of certain size.
    
    The extra information is stored efficiently in the internal data
    structure and in csdiff's native JSON format by tracking the diff
    between startLine/endLine and startColumn/endColumn, respectively,
    and only when the diff is a non-zero (positive) number.
    
    Related: csutils#136
    kdudka committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    dc2b60b View commit details
    Browse the repository at this point in the history
  3. parser-json-gcc: read endLine/endColumn if available

    Otherwise fallback to `caret`, which was the only field used so far.
    
    Related: csutils#136
    kdudka committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    3765a4f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f0fcbe9 View commit details
    Browse the repository at this point in the history
  5. writer-json-sarif: write endLine/endColumn unconditionally

    ... paired with each startLine/startColumn to be compatible
    with `shellcheck-sarif` and `sarif-fmt`.
    
    Resolves: csutils#136
    Closes: csutils#167
    kdudka committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    6477631 View commit details
    Browse the repository at this point in the history