Skip to content

Commit 97ebdc0

Browse files
SONARPY-272: Rule S1451: Track lack of copyright and license headers (#1099)
1 parent 52ec9e8 commit 97ebdc0

23 files changed

+19199
-1
lines changed

its/ruling/src/test/java/org/sonar/python/it/PythonRulingTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,13 @@ public class PythonRulingTest {
4444
@BeforeClass
4545
public static void prepare_quality_profile() {
4646
ProfileGenerator.RulesConfiguration parameters = new ProfileGenerator.RulesConfiguration()
47-
.add("CommentRegularExpression", "message", "The regular expression matches this comment");
47+
.add("CommentRegularExpression", "message", "The regular expression matches this comment")
48+
.add("S1451","headerFormat" , "# Copyright 2004 by Harry Zuzan. All rights reserved.\n" +
49+
"# Copyright 2016 by Adam Kurkiewicz. All rights reserved.\n" +
50+
"# This file is part of the Biopython distribution and governed by your\n" +
51+
"# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n" +
52+
"# Please see the LICENSE file that should have been included as part of this\n" +
53+
"# package.");
4854
String serverUrl = ORCHESTRATOR.getServer().getUrl();
4955
File profileFile = ProfileGenerator.generateProfile(serverUrl, "py", "python", parameters, Collections.emptySet());
5056
ORCHESTRATOR.getServer().restoreProfile(FileLocation.of(profileFile));

0 commit comments

Comments
 (0)