Questions tagged [codacy]

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

59 questions
1
vote
1 answer

Should I include module.exports above or below constructor

I'm using Codacy for my project and i'm getting a warning saying that I shouldn't use variables which I declare later, which is quite logical. However, this should work fine for constructors. This is my main file structure: /* Export…
Thomas Wagenaar
  • 6,489
  • 5
  • 30
  • 73
1
vote
1 answer

sbt-codacy-coverage fails to upload data from Travis CI

I have set up a Scala/SBT project with Travis CI and Codacy integration. The sources are visible at https://github.com/guilgaly/itunes-dap-sync. I wanted to be able to view a code coverage report in Codacy, so I added the following SBT…
Cyäegha
  • 4,191
  • 2
  • 20
  • 36
1
vote
2 answers

Unused variables in PyCharm

if ".jpg" in link or ".png" in link: fd = urllib.request.urlopen(link) #Checks the dimensions of said image file Image_file = io.BytesIO(fd.read()) with Image.open(Image_file) as im: width, height = im.size …
lnus
  • 31
  • 7
1
vote
0 answers

Unknown DU anomaly in Login service

Codacy is indicating that I have a DU anomaly ("A recently defined variable is undefined. These anomalies may appear in normal source text.") for the variable stringRequest. I can't find it, can anyone help me? Thanks. public static void…
0
votes
0 answers

Unable to find any artifacts for the associated workflow

trying to download the codacy coverage report from github. using this below code in workflow name: codacy-coverage-reporter on: ["push"] jobs: codacy-coverage-reporter: runs-on: ubuntu-latest name: codacy-coverage-reporter steps: …
saravankg
  • 909
  • 1
  • 10
  • 21
0
votes
1 answer

"Break early" if one of GitHub actions fails

Our CI setup is currently looking like this on GitHub: Usually, first check is finishing much sooner than second check. It can succeed or fail. Is it possible (and if so - how) to "break early" and terminate remaining actions as soon as some action…
ror
  • 3,295
  • 1
  • 19
  • 27
0
votes
1 answer

Why does codacy give `Unnecessary block` error for function declaration?

We are using codacy for static code analysis. On pushing a change to the js file, where we are declaring a function that returns an object, it is giving the below error. Internally, codacy tells us this is reported since PMD 5.0. We are not sure if…
nak
  • 846
  • 2
  • 10
  • 26
0
votes
1 answer

Codacy - Is it possible to turn off rule for specified paths using codacy.yaml file?

I couldn't find the information in Codacy documentation or github repositories, but has anyone ever tried turning off rules for specific paths? This is a complete guess what it could look like: --- engines: detekt: exclude_rules: …
Maciaz
  • 1,084
  • 1
  • 16
  • 31
0
votes
0 answers

Getting static analysis of GitHub repositories

thank you all for taking the time reading my post. I have an assignment where I have to do static analysis for various github repositories. The tool I found is Codacy (I'm open to recommendations though) and I'm trying to see how I can use it using…
golto4
  • 1
0
votes
1 answer

Illegal character(s) in message header value while uploading to Codacy in Prow CI

I have jacoco code coverage report for my Kotlin project and I am uploading it to the Codacy. I am using codacy-coverage-reporter 7.1.0 and using the following gradle task to upload the report. task("uploadTestCoverageReportToCodacy",…
Aman Sinha
  • 11
  • 5
0
votes
1 answer

Best practice for using codacy in my jenkins pipeline

Currently, I have subscribed to codacy pro. And I want to use codacy in my Jenkins pipeline, and I found codacy-analysis-cli. I tried to do a test on my local using this command: codacy-analysis-cli analyze --directory /home/codacy/backend-service…
Junos
  • 11
  • 2
0
votes
1 answer

How don't direct use $_FILES Superglobal in PHP?

I'm looking for an alternative to get the data inside the $_FILES due to a codacy issue I don't know how to don't use directly the superglobals. I can't use filter_input like I did for resolve the same issue with $_POST Below this, my form :
user11622119
0
votes
1 answer

how to specify code lines to exclude them from Codacy analysis

Codacy analysis on git project I had to exclude a few code lines from codacy analysis Ho I can do it? is Codacy has own anotations?(e.g. @SkipLine) //need crutch for codacy analysis
0
votes
1 answer

Is it possible to have different rules for main and test code?

Is it possible to set different rules for main versus test code in Codacy? I know I can eliminate inspection of test code. But I don't want to do that. However, there are many rules, especially regarding duplication, that just don't make sense for…
Phasmid
  • 923
  • 7
  • 19
0
votes
2 answers

Codacy feature in github is giving me some errors I can't understand

I have a repository with Codacy incorporated to check the quality of my code. When trying to do a commit I'm getting these two errors that I don't know how to fix... any help? Expected property shorthand. in this line:…
Lucia
  • 1