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

var-spacing: fix multiline nested JSON false positive #1672

Commits on Jul 17, 2021

  1. E206: Increase testing accuracy

    VariableHasSpacesRule testing was limited to ensuring that the number of
    error was matching an expected number. This could have potential
    limitation where for example a commit prevents an real linting error
    from being raised and in the same time raises an invalid one.
    
    This commit aims at improving this rule's testing by ensuring that
    errors are raised only on a controlled set of lines.
    
    Related to: ansible#1671
    simonkeyd committed Jul 17, 2021
    Configuration menu
    Copy the full SHA
    b148d59 View commit details
    Browse the repository at this point in the history
  2. E206: Add testing for false positive nested JSON

    This commit adds 4 new tasks in example playbook used for
    VariableHasSpacesRule testing.
    
    One of these rule is a nested multiline JSON object which has its
    opening and closing brackets spanned on different lines. And this rule
    raises false positive error.
    
    Related to ansible#1671
    simonkeyd committed Jul 17, 2021
    Configuration menu
    Copy the full SHA
    21e389f View commit details
    Browse the repository at this point in the history
  3. E206: Fix multiline nested JSON false positive

    When using a nested JSON object spanned on multiple lines in a Jinja2
    context ansible-lint raises a false positive E206 error.
    
    This commit extends the regex in charge of excluding false positive JSON
    objects so that it handles multiline matching.
    
    Fixes ansible#1671
    simonkeyd committed Jul 17, 2021
    Configuration menu
    Copy the full SHA
    b463caf View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2021

  1. Configuration menu
    Copy the full SHA
    8edcf9a View commit details
    Browse the repository at this point in the history