Skip to content

Commit dd00fd9

Browse files
authored
Merge pull request #32 from codacy/FT-5058-PyLint-pattern-Enforce-naming-conventions-stopped-providing-results
Add workaround for pylint issue 2280
2 parents 93824ab + eca7d1d commit dd00fd9

File tree

3 files changed

+60
-42
lines changed

3 files changed

+60
-42
lines changed

.circleci/config.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
version: 2
2+
jobs:
3+
build:
4+
machine: true
5+
working_directory: ~/workdir
6+
steps:
7+
- checkout
8+
- run:
9+
name: Clone test project
10+
working_directory: ~/
11+
command: |
12+
(git -C ~/codacy-plugins-test fetch --all &&
13+
git -C ~/codacy-plugins-test reset --hard origin/master) ||
14+
git clone git://github.com/codacy/codacy-plugins-test.git ~/codacy-plugins-test
15+
- restore_cache:
16+
key: dependencies-{{ checksum "build.sbt" }}
17+
- run:
18+
name: Compile test project
19+
working_directory: ~/codacy-plugins-test
20+
command: sbt compile
21+
- run:
22+
name: Publish tool docker locally
23+
working_directory: ~/workdir
24+
command: sbt 'set version in Docker := "latest"' "set name := \"$CIRCLE_PROJECT_REPONAME\"" docker:publishLocal
25+
- save_cache:
26+
key: dependencies-{{ checksum "build.sbt" }}
27+
paths:
28+
- "~/.ivy2"
29+
- "~/.m2"
30+
- "~/.sbt"
31+
- "~/codacy-plugins-test/target"
32+
- "~/codacy-plugins-test/project/target"
33+
- "~/codacy-plugins-test/project/project"
34+
- "~/workdir/target"
35+
- "~/workdir/project/target"
36+
- "~/workdir/project/project"
37+
- run:
38+
name: Test json
39+
working_directory: ~/codacy-plugins-test
40+
command: sbt -Dcodacy.tests.ignore.descriptions=true "run-main codacy.plugins.DockerTest json $CIRCLE_PROJECT_REPONAME:latest"
41+
- run:
42+
name: Test patterns
43+
working_directory: ~/codacy-plugins-test
44+
command: sbt -Dcodacy.tests.noremove=true -Dcodacy.tests.threads=8 "run-main codacy.plugins.DockerTest pattern $CIRCLE_PROJECT_REPONAME:latest"
45+
- deploy:
46+
name: Push application Docker image
47+
command: |
48+
if [ "${CIRCLE_BRANCH}" == "master" ]; then
49+
docker login -u $DOCKER_USER -p $DOCKER_PASS
50+
docker tag $CIRCLE_PROJECT_REPONAME codacy/$CIRCLE_PROJECT_REPONAME
51+
docker tag $CIRCLE_PROJECT_REPONAME codacy/$CIRCLE_PROJECT_REPONAME:1.0.$CIRCLE_BUILD_NUM
52+
docker push codacy/$CIRCLE_PROJECT_REPONAME
53+
fi
54+
55+
workflows:
56+
version: 2
57+
build-and-deploy:
58+
jobs:
59+
- build

circle.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

src/main/scala/codacy/pylint/Pylint.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ object Pylint extends Tool {
9090
}
9191
}
9292

93-
private val msgTemplate = "{path}###{line}###{msg_id}###{msg}"
93+
private val msgTemplate = "{abspath}###{line}###{msg_id}###{msg}"
9494
private val classifyScript =
9595
s"""
9696
|import os

0 commit comments

Comments
 (0)