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

Change the way how additional spotless configuration is applied #49

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/PullRequestCreated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
# For external PR, ticket should be created manually
if: |
github.event.pull_request.head.repo.full_name == github.repository
&& github.event.sender.type != 'Bot'
steps:
- id: secrets
uses: SonarSource/vault-action-wrapper@v3
Expand Down
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
[submodule "build-logic"]
path = build-logic
url = https://github.com/SonarSource/cloud-native-gradle-modules
branch = petertrr/fix-spotless-config
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,7 @@ You can also build and run only Ruling Tests:

## License headers

License headers are automatically updated by the spotless plugin but only for Java files.
Furthermore, there are files such as `package-info.java` and `module-info.java` that spotless ignores.
Also the Go source files are not handled. For those files use a manual script like below to update the license:

```shell
`find . -type f -name "*.go" -exec sed -i '' 's/2018-2023/2018-2024/' "{}" \;`
```
License headers are automatically updated by the spotless plugin.

## License

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import java.util.jar.JarInputStream

plugins {
id("org.sonarsource.cloud-native.code-style-conventions")
id 'com.jfrog.artifactory' version '4.28.2'
id 'org.sonarqube' version '6.0.1.5171'
id 'de.thetaphi.forbiddenapis' version '3.0' apply false
Expand All @@ -21,7 +22,7 @@ allprojects {
}

repositories {
mavenLocal()
mavenCentral()
def artifactoryBearerToken = System.getenv("ARTIFACTORY_PRIVATE_PASSWORD") ?: project.findProperty("artifactoryPassword")
if (artifactoryBearerToken) {
maven {
Expand All @@ -35,7 +36,6 @@ allprojects {
}
}
}
mavenCentral()
}
}

Expand Down
16 changes: 16 additions & 0 deletions its/plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* SonarSource Go
* Copyright (C) 2018-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the Sonar Source-Available License Version 1, as published by SonarSource SA.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Sonar Source-Available License for more details.
*
* You should have received a copy of the Sonar Source-Available License
* along with this program; if not, see https://sonarsource.com/license/ssal/
*/
plugins {
id("org.sonarsource.cloud-native.java-conventions")
id("org.sonarsource.cloud-native.code-style-conventions")
Expand Down
16 changes: 16 additions & 0 deletions its/ruling/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* SonarSource Go
* Copyright (C) 2018-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the Sonar Source-Available License Version 1, as published by SonarSource SA.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Sonar Source-Available License for more details.
*
* You should have received a copy of the Sonar Source-Available License
* along with this program; if not, see https://sonarsource.com/license/ssal/
*/
plugins {
id("org.sonarsource.cloud-native.java-conventions")
id("org.sonarsource.cloud-native.code-style-conventions")
Expand Down
16 changes: 16 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* SonarSource Go
* Copyright (C) 2018-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the Sonar Source-Available License Version 1, as published by SonarSource SA.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Sonar Source-Available License for more details.
*
* You should have received a copy of the Sonar Source-Available License
* along with this program; if not, see https://sonarsource.com/license/ssal/
*/
pluginManagement {
includeBuild("build-logic")
}
Expand Down
16 changes: 16 additions & 0 deletions sonar-go-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* SonarSource Go
* Copyright (C) 2018-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the Sonar Source-Available License Version 1, as published by SonarSource SA.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Sonar Source-Available License for more details.
*
* You should have received a copy of the Sonar Source-Available License
* along with this program; if not, see https://sonarsource.com/license/ssal/
*/
import java.text.SimpleDateFormat
import java.util.Date
import java.util.HashSet
Expand Down
16 changes: 16 additions & 0 deletions sonar-go-to-slang/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* SonarSource Go
* Copyright (C) 2018-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the Sonar Source-Available License Version 1, as published by SonarSource SA.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Sonar Source-Available License for more details.
*
* You should have received a copy of the Sonar Source-Available License
* along with this program; if not, see https://sonarsource.com/license/ssal/
*/
plugins {
id("org.sonarsource.cloud-native.code-style-conventions")
}
Expand Down
Loading