Scala wrapper for the Codacy API.
If you use Maven you can declare the dependency:
<dependency>
<groupId>com.codacy</groupId>
<artifactId>codacy-api-java</artifactId>
<version>VERSION</version>
</dependency>
First, declare the dependency on SBT:
"com.codacy" %% "codacy-api-scala" % "VERSION"
Usage example (extracted from our sbt-codacy-coverage tool:
val apiUrl = "https://api.codacy.com/"
val projectToken = "randomizedTokenGeneratedByCodacy"
val codacyClient = new CodacyClient(Some(apiUrl), projectToken = Some(projectToken))
val coverageServices = new CoverageServices(codacyClient)
val commitUUID = "gitCommitUUID"
val report = ...
coverageServices.sendReport(commitUUID, Language.Scala, report) match {
case requestResponse if requestResponse.hasError =>
logger.error(s"Failed to upload data. Reason: ${requestResponse.message}")
state.exit(ok = false)
Left(requestResponse.message)
case requestResponse =>
logger.success(s"Coverage data uploaded. ${requestResponse.message}")
Right(state)
}
- Rodrigo Fernandes
- Rafael Cortês
- João Machado
- João Caxaria
- Pedro Rijo
Codacy is an Automated Code Review Tool that monitors your technical debt, helps you improve your code quality, teaches best practices to your developers, and helps you save time in Code Reviews.
- Identify new Static Analysis issues
- Commit and Pull Request Analysis with GitHub, BitBucket/Stash, GitLab (and also direct git repositories)
- Auto-comments on Commits and Pull Requests
- Integrations with Slack, HipChat, Jira
- Track issues in Code Style, Security, Error Proneness, Performance, Unused Code and other categories
Codacy also helps keep track of Code Coverage, Code Duplication, and Code Complexity.
Codacy supports PHP, Python, Ruby, Java, JavaScript, and Scala, among others.
Codacy is free for Open Source projects.
codacy-api-scala is available under the MIT license. See the LICENSE file for more info.