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

Write migration guide for 1.5 -> 2.0 #44

Open
Zabuzard opened this issue Nov 21, 2022 · 2 comments
Open

Write migration guide for 1.5 -> 2.0 #44

Zabuzard opened this issue Nov 21, 2022 · 2 comments
Assignees

Comments

@Zabuzard
Copy link

Zabuzard commented Nov 21, 2022

Just got send here by @dependabot. We have been running 1.5.0.

It appears that there have been a few breaking changes since then. For example, it is now sonarLint, not sonarlint anymore. And the way rules are configured changed as well.

Looking at the usage-stats at Maven-Central, I am probably not the only one who got asked to migrate to 2.0.0 now. It would be helpful if someone can provide some sort of migration guide for the breaking changes 👍

Also, where is the old source code? Seems this repo only contains the code from 2.0.0 and its RCs.

@remal
Copy link
Member

remal commented Nov 28, 2022

@Zabuzard thank you for the request!

initially, this plugin was created as a part of a huge monorepo with many Gradle plugins. Unfortunately, it was becoming harder and harder to maintain this monorepo. So, I decided to extract some of the plugins to GitHub and move away from the monorepo approach.

Version 1.x of this plugin hasn't been maintained for a while and even was removed from the monorepo, as became incompatible with some new Gradle/SonarLint version, and it would take too long for me to fix it.

I'd consider writing a migration guide but can't promise you anything. If I have time to write such a guide, I'll do it. Leaving the issue open for now.

Sorry for the late response.

@remal remal self-assigned this Jan 30, 2023
@jcucuzza
Copy link

jcucuzza commented Jan 14, 2024

The example shown in the gitlab guide for 1.5.0 looks like this in 3.4.3.

1.5.0 (old)

sonarlint {
    ignoreFailures = false
    excludes {
        message 'java:S1214'
        message 'kotlin:S100'
        message 'xml:S125'
    }
    includes {
        message 'java:S4266' // Enable java:S4266 which is disabled by default
    }
    ruleParameter('java:S119', 'format', '^[A-Z][a-zA-Z0-9]*$') // Allow upper camel-case for type parameter names
}

3.4.3 (new)

sonarLint {
    ignoreFailures = false
    rules {
        enable (
            'java:S4266', // Enable java:S4266 which is disabled by default
        )
        disable (
            'java:S1214',
            'kotlin:S100',
            'xml:S125',
        )
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants