All Projects → codacy → codacy-scalameta

codacy / codacy-scalameta

Licence: other
Codacy tool for Scalameta

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to codacy-scalameta

Radar
实时风控引擎(Risk Engine),自定义规则引擎(Rule Script),完美支持中文,适用于反欺诈(Anti-fraud)应用场景,开箱即用!!!移动互联网时代的风险管理利器,你 Get 到了吗?
Stars: ✭ 781 (+2131.43%)
Mutual labels:  analysis, engine
Cortex
Cortex: a Powerful Observable Analysis and Active Response Engine
Stars: ✭ 676 (+1831.43%)
Mutual labels:  analysis, engine
React Vtree
React component for efficiently rendering large tree structures
Stars: ✭ 185 (+428.57%)
Mutual labels:  tree
Computer Science In Javascript
Computer science reimplemented in JavaScript
Stars: ✭ 2,590 (+7300%)
Mutual labels:  tree
Git Master
Git Master Extension for git file tree, support GitHub、GitLab 、 Gitee、Gitea
Stars: ✭ 205 (+485.71%)
Mutual labels:  tree
Rrt Algorithms
n-dimensional RRT, RRT* (RRT-Star)
Stars: ✭ 195 (+457.14%)
Mutual labels:  tree
Element Tree Grid
tree grid extends element ui with vue
Stars: ✭ 223 (+537.14%)
Mutual labels:  tree
Orgchart
It's a simple and direct organization chart plugin. Anytime you want a tree-like chart, you can turn to OrgChart.
Stars: ✭ 2,325 (+6542.86%)
Mutual labels:  tree
spinmob
Rapid and flexible acquisition, analysis, fitting, and plotting in Python. Designed for scientific laboratories.
Stars: ✭ 34 (-2.86%)
Mutual labels:  analysis
Lark
Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
Stars: ✭ 2,916 (+8231.43%)
Mutual labels:  tree
Libdict
C library of key-value data structures.
Stars: ✭ 234 (+568.57%)
Mutual labels:  tree
Heyui
🎉UI Toolkit for Web, Vue2.0 http://www.heyui.top
Stars: ✭ 2,373 (+6680%)
Mutual labels:  tree
Outwiker
Сross-platform software for keeping your notes in a tree
Stars: ✭ 198 (+465.71%)
Mutual labels:  tree
Scikit Garden
A garden for scikit-learn compatible trees
Stars: ✭ 230 (+557.14%)
Mutual labels:  tree
Fast
Find in AST - Search and refactor code directly in Abstract Syntax Tree as you do with grep for strings
Stars: ✭ 194 (+454.29%)
Mutual labels:  tree
Merkletree
A Merkle Tree implementation written in Go.
Stars: ✭ 236 (+574.29%)
Mutual labels:  tree
Interview Questions
List of all the Interview questions practiced from online resources and books
Stars: ✭ 187 (+434.29%)
Mutual labels:  tree
Fancytree
JavaScript tree view / tree grid plugin with support for keyboard, inline editing, filtering, checkboxes, drag'n'drop, and lazy loading
Stars: ✭ 2,398 (+6751.43%)
Mutual labels:  tree
Vuejs Tree
A highly customizable and blazing fast Vue tree component ⚡🌲
Stars: ✭ 211 (+502.86%)
Mutual labels:  tree
mst-persist
Persist and hydrate MobX-state-tree stores (in < 100 LoC)
Stars: ✭ 75 (+114.29%)
Mutual labels:  tree

Codacy Badge Build Status

Codacy scala.meta

This is the codacy engine for scala static code analysis build on top of scala.meta. Check the Docs section for more information.

Developing

implementing a new Pattern:

It is usually a good idea to start by implementing the test file. It contains issues the new pattern should detect as well as implementations that correct said issues. This defines the constraints of what the pattern should and also should not detect and helps avoid false positives. To create a testfile add it to the resources under docs/tests/ You can take a look at the already implemented tests in our base plugin

Next we implement the actual code. A pattern must currently reside in the package codacy.patterns and implement the codacy.base.Pattern interface. Which means it must implement the def apply(tree:Tree):Iterable[Result]. In most cases the collect method on trees that scala.meta provides us with is sufficient for that purpose. A Result consist of a Message (which itself is just a type-wrapped String) and a Positionable which can currently be implicitly obtained by passing a scala.meta.Tree or a scala.meta.Token

Sometimes one might want to change the behavior of the pattern according to some configuration. Such a configuration has to follow some basic rules and gets passed to the pattern as the only argument in the constructor. The rules are:

  1. it needs to be a case class

  2. all arguments need to define defaults

  3. json readers and writers must exist for the argument types. (Currently that means primitive types and scala.util.matching.Regex)

Additional steps can be found in the chapter Tool Integration with one exeption: there is no need to explicitly add pattern parameters to patterns defined in patterns.json since that's already being covered by rule 2 of the configuration rules. For a full example check out the existing patterns

Quasiquotes:

https://github.com/scalameta/scalameta/blob/master/notes/quasiquotes.md

Tool Integration:

https://docs.codacy.com/related-tools/tool-developer-guide/

Testing with "sbt console":

import scala.meta._

val code = """ .... """

val tree = code.parse[Source]

codacy.patterns.Custom_Scala_ElseIf(tree)

//To see the tree structure:

tree.show[Structure]

Usage

You can create the docker by doing:

sbt docker:publishLocal

The docker is ran with the following command:

docker run -it -v $srcDir:/src  <DOCKER_NAME>:<DOCKER_VERSION>

Docs

Tool Developer Guide

Tool Developer Guide - Using Scala

Test

We use the codacy-plugins-test to test our external tools integration. You can follow the instructions there to make sure your tool is working as expected.

What is Codacy?

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.

Among Codacy’s features:

  • 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, YouTrack
  • 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.

Free for Open Source

Codacy is free for Open Source projects.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].