Path exclusions

Some folders are not meant to be analysed

Default excludes and includes

codebeat by default makes a number of decisions on which folders and files to analyse. First of all it determines the language of a file by looking at an extension. If a programming language is not yet supported, the file is ignored by default. Then, codebeat filters out test and spec files which generally don't follow the same strict quality rules as the rest of the project. On top of that language-specific decisions are made.

Swift

Examples, Tests, Specs and Pods directories are excluded from analysis. Additionally, all other files with *Test(s).swift, *Spec(s).swift, *Package(s).swift suffixes are omitted.

Obj-C
Excluded directories are: Example(s), Test(s), Spec(s), Pods, ThirdParty, Carthage. We also exclude files with *Test(s), *Spec(s), *Package(s) suffixes.

Ruby

Test(s), Spec(s), Feature(s), Db, Bin, Config, Gems directories are excluded from analysis. Also files with *Test.rb and *Spec.rb suffixes are omitted.

Go

Go projects on the other hand tend to be more varied in terms of their setup so by default we only exclude dependencies from Godeps, vendor and third_party directories.

Python

Excluded directory: /test/, /Tests/.

Java

Excluded directory: /test/, /Tests/.

Kotlin

Excluded directory: /test/, /Tests/.

Javascript

Excluded directory: /test[s]/, /spec[s]/, /buil[dt]/, bin, dist, config, node_modules, typings, deps. Additionally files that end with test or spec are excluded.

Typescript

Excluded directory: /test[s]/, /spec[s]/, /buil[dt]/, bin, dist, config, node_modules, typings, deps. Additionally files that end with test or spec and typings files d.ts are excluded.

Elixir

Excluded directory: /deps/, /test/.

These defaults are not overridable. If they get in your way please let us know and describe your use case.

Manual excludes

On top of that you might want to exclude some directories from analysis. Good examples of such directories would contain generated (mocks, code from IDLs) or third-party code. This can be done by adding a .codebeatignore file to the root of your project. This file works pretty much the same as .gitignore - it requires one glob/pattern per line. You can exclude individual files or directories. If you need an recursive exclude you can add it by using double star. Here is an example that excludes a single Go file from a dispatcher directory, first level children in the builders directory and all the content (recursively) of the proto directory:

dispatcher/language_selectors.go
builders/*
proto/**