Questions tagged [codacy]

Codacy tag is used for issues related with the Codacy platform and/or its open source tools.

59 questions
2
votes
1 answer

Disable rule for Sonar C#

I’d like to disable certain rules for Sonar C# for my Codacy project. According to the SonarQube docs, I have to create an .editorconfig file, so I did: [*.cs] dotnet_diagnostic.S121.severity = none dotnet_diagnostic.S3216.severity = none However,…
mu88
  • 4,156
  • 1
  • 23
  • 47
2
votes
0 answers

SuppressionFilter in checkstyle.xml read by Codacy?

Are SuppressionFilters in checkstyle.xml are followed by Codacy? So I want to make sure that if the rules specified in the…
Gayan Weerakutti
  • 11,904
  • 2
  • 71
  • 68
2
votes
1 answer

Importing Codacy issues to GitHub

I have a lot of issues in my Codacy dashboard, but these don't show up in my github repository. I want to import them from Codacy to GitHub to use in repository management. Is it possible? If so, how can I do it?
Danilo Silva
  • 171
  • 9
2
votes
1 answer

Default case in conflict between linter and code coverage in Scala

My linters always complain when I don't have a default case in pattern matching in Scala. However, often the default case is artificial and my programs can never actually reach that case. As an example, consider the following program: scala> val x =…
Felix
  • 8,385
  • 10
  • 40
  • 59
2
votes
2 answers

Not enough arguments for format string python

On codacy it detects an issue where I dont have enough arguments for format string. Help please. code: self.notify.error("An item we don't have: track %s level %s was selected." % [track, level])
Mgracer
  • 37
  • 1
  • 11
1
vote
1 answer

Codacy analyzer warning: In POSIX sh, [[ ]] is undefined

When I run codacy-analysis-cli analyze command for the next line of script: if [[ "$lexer_date" > "$lexer_ts_date" ]]; then generate_grammar fi I got the next warning: Found [Warning] `In POSIX sh, [[ ]] is undefined.` in scripts/grammar.sh:20…
Nizami
  • 35
  • 8
1
vote
1 answer

How to configure Codacy Python linters?

I recently enabled GitHub Codacy scans on my repo. The Pylint* and Prospector modules (if that is the right terminology) report a lot of warnings: I have to believe there's a way to configure what they flag, perhaps via an rc file or a .yml placed…
mhucka
  • 2,143
  • 26
  • 41
1
vote
1 answer

Ignore Global variables in Codacy

I am using eslint in my angularjs project. My project has a Github integration with Codacy (using config file). I have configured my global variables which need to be ignored from linting in the .eslintrc file as below: { "extends":…
Pankaj
  • 474
  • 1
  • 3
  • 16
1
vote
0 answers

Not able to add custom rules in checkstyle.xml for Codacy in android studio

I want to add custom rules in checkstyle.xml so that I can view them in codacy Dashboard. I am facing following issues while doing that. I have written a custom class to check unused private methods in a classes. It is showing instantiation error…
Onkar1277
  • 21
  • 6
1
vote
1 answer

Travis CI error with Codacy (Project token not provided and not available in environment)

I'm trying to use Codacy with Travis CI, Spring Boot and Maven. My .travis.yml: env: global: - CODACY_PROJECT_TOKEN = Zcs.... My pom.xml…
Rodrigo Batista
  • 151
  • 2
  • 12
1
vote
1 answer

How to transform my regular expression detecting 127.0.0.1/8 IP to a safer one?

To detect all IP in the 127.0.0.1/8 network , I'm using this common regular expression: /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ Job is done, but codacy via es-lint is detecting this regexp as unsafe. I already read this blog, this…
Alexandre Tranchant
  • 4,426
  • 4
  • 43
  • 70
1
vote
2 answers

Codacy yaml configuration to ignore duplication in test files

I'd like to exclude the duplication check from my test files, but leave everything else the same. This is my .codacy.yml file: duplication: enabled: true exclude_paths: - 'test/**' - '**.test.js' But I still get all duplications…
Predrag Stojadinović
  • 3,439
  • 6
  • 34
  • 52
1
vote
1 answer

the "this" keyword is disallowed outside of a class body

I have function, here is code function remove_multi_leg(): void { if (Number($("#search_no_legs").val()) < 2) { return; } const removeId: number = Number($(this).attr("data-number")); const highestId: number =…
Balance
  • 121
  • 3
  • 13
1
vote
1 answer

Spek access to Internal Visibility Kotlin Classes

I've put together a Maven-based project that uses Spek in the Junit 4 Runner for testing. I configured the project in Codacy and got a useful suggestion to either document my public classes or reduce their visibility (great). I've found that the…
Ed Kohlwey
  • 468
  • 2
  • 8
1
vote
1 answer

How to re-write function without generic object injection sink in AngularJS?

I have a function and it works just fine, but codacy inspection says it is bad practice to do so. I understand that it even looks unsafe, but I cannot come up with how to do it another, better, way. function getCount(i) { var iCount =…
Bobby
  • 534
  • 3
  • 7
  • 21