Skip to content

Commit d74b478

Browse files
authored
Merge pull request #19 from codacy/update-pylint
Update pylint
2 parents d92db03 + 9409348 commit d74b478

File tree

5 files changed

+32
-2
lines changed

5 files changed

+32
-2
lines changed

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ val installAll =
4444
|python3 -m pip install pylint-common==0.2.2 &&
4545
|python -m pip install pylint-celery==0.3 &&
4646
|python3 -m pip install pylint-celery==0.3 &&
47-
|python -m pip install pylint==1.5.4 --upgrade --ignore-installed --no-cache-dir &&
48-
|python3 -m pip install pylint==1.5.4 --upgrade --ignore-installed --no-cache-dir""".stripMargin.replaceAll(System.lineSeparator()," ")
47+
|python -m pip install pylint==1.6.4 --upgrade --ignore-installed --no-cache-dir &&
48+
|python3 -m pip install pylint==1.6.4 --upgrade --ignore-installed --no-cache-dir""".stripMargin.replaceAll(System.lineSeparator()," ")
4949

5050
mappings in Universal <++= (resourceDirectory in Compile) map { (resourceDir: File) =>
5151
val src = resourceDir / "docs"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Emitted when a conditional statement (If or ternary if) uses a constant value for its test. This might not be what the user intended to do.
2+
3+
A simple example that will be reported:
4+
5+
if True: pass

src/main/resources/docs/description/description.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,5 +834,11 @@
834834
"title": "Prohibit inheriting non classes",
835835
"description": "Do not inherit from something which is not a class.",
836836
"timeToFix": 5
837+
},
838+
{
839+
"patternId": "W0125",
840+
"title": "Prohibit a conditional statement with a constant value",
841+
"description": "Prohibits when a conditional statement (If or ternary if) uses a constant value for its test.",
842+
"timeToFix": 5
837843
}
838844
]

src/main/resources/docs/patterns.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,11 @@
706706
"patternId": "W1501",
707707
"level": "Warning",
708708
"category": "ErrorProne"
709+
},
710+
{
711+
"patternId": "W0125",
712+
"level": "Warning",
713+
"category": "ErrorProne"
709714
}
710715
]
711716
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
##Patterns: W0125
2+
3+
print('ola')
4+
5+
this_is_an_intentionally_long_name_to_trigger_a_line_too_long_message_from_pylint = None
6+
7+
##Warn: W0125
8+
if True: pass
9+
10+
while True:
11+
break
12+
13+
while True:
14+
break # 4 space indent

0 commit comments

Comments
 (0)