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

Add build task experimental rules #1307

Merged

Commits on Dec 12, 2021

  1. Add separate verification build step to include experimental rules

    Ktlint should apply the dogfooding principal and only provide experimental
    rules that at least on the ktlint code base itself gives satisfiable
    results.
    
    Initially all experimental rules that cause violations have been disabled,
    so that a separate commit can be created to enable each specific rule.
    Paul Dingemans committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    4c969c6 View commit details
    Browse the repository at this point in the history
  2. Enable rule experimental:spacing-between-declarations-with-comments

    For BaselineTests it was necessary to rename the files which are used for testing
    to have a non standard kotlin file extension. This prevents the files from being
    changed when running the ktlint formatting on the ktlint code base itself. Note
    that the baseline protection mechanism did work in this case and as of that has
    been removed from the command.
    Paul Dingemans committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    9bdfb9a View commit details
    Browse the repository at this point in the history
  3. Enable rule experimental:no-empty-first-line-in-method-block

    Paul Dingemans committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    47e9799 View commit details
    Browse the repository at this point in the history
  4. Enable rule experimental:annotation

    Paul Dingemans committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    5e2b8d5 View commit details
    Browse the repository at this point in the history
  5. Resolve some violations of rule experimental:argument-list-wrapping

    It is not yet possible to enable the rule as some violations are actually false
    positives. This will be solved by pinterest#1284
    Paul Dingemans committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    378a0a3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ae40195 View commit details
    Browse the repository at this point in the history
  7. Enable rule experimental:trailing-comma

    For now, it has been chosen to disallow trailing comma's instead of forcing them to
    be added. Reasons for this are two folded. The number of changes is considerably
    smaller. More importantly is that the benefit, with respect to avoiding future merge
    conflicts, seems not that big when scanning the code change which would result from
    forcing the trailing comma to be added.
    Paul Dingemans committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    76eb011 View commit details
    Browse the repository at this point in the history
  8. Update changelog

    Paul Dingemans committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    6944d59 View commit details
    Browse the repository at this point in the history
  9. Remove autocorrect mode from build step ktlint_experimental

    Paul Dingemans committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    8642e87 View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2021

  1. Run the experimental rules by default

    There is no need for a separate build task to run the experimental rules. The
    experimental rules can be executed by default in the "ktlint" task. Also, the
    baseline has been fixed so there is no longer a need to use extension "_kt"
    for the baseline test files.
    
    Closes pinterest#1222
    Paul Dingemans committed Dec 13, 2021
    Configuration menu
    Copy the full SHA
    fd17608 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' into add-build-task-experimental-rules

    Paul Dingemans committed Dec 13, 2021
    Configuration menu
    Copy the full SHA
    0b97269 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2021

  1. Configuration menu
    Copy the full SHA
    916e3c9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dffe890 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    48603bf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    44d88e0 View commit details
    Browse the repository at this point in the history
  5. Revert BaselineTests

    romtsn committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    b46ed06 View commit details
    Browse the repository at this point in the history
  6. Revert ktlint-test-baseline

    romtsn committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    b8d48b4 View commit details
    Browse the repository at this point in the history
  7. Fix tests

    romtsn committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    05147af View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2021

  1. Merge remote-tracking branch 'upstream/master' into add-build-task-ex…

    …perimental-rules
    
    # Conflicts:
    #	CHANGELOG.md
    #	build.gradle
    Paul Dingemans committed Dec 18, 2021
    Configuration menu
    Copy the full SHA
    74cc001 View commit details
    Browse the repository at this point in the history
  2. Exclude all test resources from the ktlint module from the linting task

    Those source files all contain linting errors which have to be reported
    by unit tests. Therefore they should not be reported during a normal
    build because those should not be fixed as that would result in the
    tests to fail.
    Paul Dingemans committed Dec 18, 2021
    Configuration menu
    Copy the full SHA
    9956e61 View commit details
    Browse the repository at this point in the history
  3. Revert renaming of file test-baseline.xml

    Paul Dingemans committed Dec 18, 2021
    Configuration menu
    Copy the full SHA
    2756678 View commit details
    Browse the repository at this point in the history
  4. Fix lint errors due to merge of master in branch

    Paul Dingemans committed Dec 18, 2021
    Configuration menu
    Copy the full SHA
    749fd76 View commit details
    Browse the repository at this point in the history