Skip to content

Commit 12572c8

Browse files
authored
Merge pull request #5 from green-code-initiative/REFACTO_LICENCE
refacto - upgrade licences
2 parents b7abe15 + e686e62 commit 12572c8

29 files changed

+431
-59
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
- [#5](https://github.com/green-code-initiative/ecoCode-python/pull/5) Upgrade licence system and licence headers of Java files
15+
1416
### Deleted
1517

1618
## [1.4.0] - 2023-08-08

pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
<name>ecoCode - Python language</name>
1111
<description>Provides rules to reduce the environmental footprint of your Python programs</description>
12+
<inceptionYear>2023</inceptionYear>
1213
<url>https://github.com/green-code-initiative/ecoCode-python</url>
1314

1415
<organization>
@@ -231,6 +232,34 @@
231232
</execution>
232233
</executions>
233234
</plugin>
235+
<plugin>
236+
<groupId>com.mycila</groupId>
237+
<artifactId>license-maven-plugin</artifactId>
238+
<version>4.1</version>
239+
<configuration>
240+
<properties>
241+
<owner>Green Code Initiative</owner>
242+
<email>https://www.ecocode.io</email>
243+
</properties>
244+
<licenseSets>
245+
<licenseSet>
246+
<header>com/mycila/maven/plugin/license/templates/GPL-3.txt</header>
247+
<includes>
248+
<include>**/*.java</include>
249+
</includes>
250+
</licenseSet>
251+
</licenseSets>
252+
</configuration>
253+
<executions>
254+
<execution>
255+
<id>validate</id>
256+
<goals>
257+
<goal>check</goal>
258+
</goals>
259+
<phase>validate</phase>
260+
</execution>
261+
</executions>
262+
</plugin>
234263
</plugins>
235264
</build>
236265
</project>

src/main/java/fr/greencodeinitiative/python/PythonPlugin.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
/*
2-
* Copyright (C) 2023 Green Code Initiative
2+
* ecoCode - Python language - Provides rules to reduce the environmental footprint of your Python programs
3+
* Copyright © 2023 Green Code Initiative (https://www.ecocode.io)
34
*
4-
* This program is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU Lesser General Public
6-
* License as published by the Free Software Foundation; either
7-
* version 3 of the License, or (at your option) any later version.
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
89
*
910
* This program is distributed in the hope that it will be useful,
1011
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12-
* Lesser General Public License for more details.
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
1314
*
1415
* You should have received a copy of the GNU General Public License
1516
* along with this program. If not, see <http://www.gnu.org/licenses/>.

src/main/java/fr/greencodeinitiative/python/PythonRuleRepository.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
/*
2-
* Copyright (C) 2023 Green Code Initiative
2+
* ecoCode - Python language - Provides rules to reduce the environmental footprint of your Python programs
3+
* Copyright © 2023 Green Code Initiative (https://www.ecocode.io)
34
*
4-
* This program is free software; you can redistribute it and/or
5-
* modify it under the terms of the GNU Lesser General Public
6-
* License as published by the Free Software Foundation; either
7-
* version 3 of the License, or (at your option) any later version.
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
89
*
910
* This program is distributed in the hope that it will be useful,
1011
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12-
* Lesser General Public License for more details.
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
1314
*
1415
* You should have received a copy of the GNU General Public License
1516
* along with this program. If not, see <http://www.gnu.org/licenses/>.

src/main/java/fr/greencodeinitiative/python/checks/AvoidDoubleQuoteCheck.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* ecoCode - Python language - Provides rules to reduce the environmental footprint of your Python programs
3+
* Copyright © 2023 Green Code Initiative (https://www.ecocode.io)
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
118
package fr.greencodeinitiative.python.checks;
219

320
import org.sonar.check.Rule;

src/main/java/fr/greencodeinitiative/python/checks/AvoidFullSQLRequest.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* ecoCode - Python language - Provides rules to reduce the environmental footprint of your Python programs
3+
* Copyright © 2023 Green Code Initiative (https://www.ecocode.io)
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
118
package fr.greencodeinitiative.python.checks;
219

320

src/main/java/fr/greencodeinitiative/python/checks/AvoidGettersAndSetters.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* ecoCode - Python language - Provides rules to reduce the environmental footprint of your Python programs
3+
* Copyright © 2023 Green Code Initiative (https://www.ecocode.io)
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
118
package fr.greencodeinitiative.python.checks;
219

320
import java.util.List;

src/main/java/fr/greencodeinitiative/python/checks/AvoidGlobalVariableInFunctionCheck.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* ecoCode - Python language - Provides rules to reduce the environmental footprint of your Python programs
3+
* Copyright © 2023 Green Code Initiative (https://www.ecocode.io)
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
118
package fr.greencodeinitiative.python.checks;
219

320
import java.util.ArrayList;

src/main/java/fr/greencodeinitiative/python/checks/AvoidListComprehensionInIterations.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* ecoCode - Python language - Provides rules to reduce the environmental footprint of your Python programs
3+
* Copyright © 2023 Green Code Initiative (https://www.ecocode.io)
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
118
package fr.greencodeinitiative.python.checks;
219

320
import org.sonar.check.Rule;

src/main/java/fr/greencodeinitiative/python/checks/AvoidMultipleIfElseStatementCheck.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
/*
2-
* SonarQube PHP Custom Rules Example
3-
* Copyright (C) 2016-2016 SonarSource SA
4-
* mailto:contact AT sonarsource DOT com
2+
* ecoCode - Python language - Provides rules to reduce the environmental footprint of your Python programs
3+
* Copyright © 2023 Green Code Initiative (https://www.ecocode.io)
54
*
6-
* This program is free software; you can redistribute it and/or
7-
* modify it under the terms of the GNU Lesser General Public
8-
* License as published by the Free Software Foundation; either
9-
* version 3 of the License, or (at your option) any later version.
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
109
*
1110
* This program is distributed in the hope that it will be useful,
1211
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14-
* Lesser General Public License for more details.
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
1514
*
16-
* You should have received a copy of the GNU Lesser General Public License
17-
* along with this program; if not, write to the Free Software Foundation,
18-
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1917
*/
2018
package fr.greencodeinitiative.python.checks;
2119

0 commit comments

Comments
 (0)