Skip to content
Branch: master
Commits on Jun 12, 2019
  1. Python3: don't crash on bytes literal

    maxjacobson committed Jun 12, 2019
    What happens is that we try to cast this business from the AST to JSON,
    which does not work. In python 2, it's just treated like a regular
    string. But in python 3, we recognize that it is a bytes literal.
    This implemention casts the bytes literal to a string, which is a type
    that is serialiable to JSON:
    >>> (b'hello').decode()
    This will default to utf8, and generally works, although it's possible
    sometimes it will not work if the source file is encoded differently.
    An alternative is to cast it to an array of integers, which would also
    work for structural-comparison purposes:
    >>> list(b'hello')
    [104, 101, 108, 108, 111]
Commits on Jun 11, 2019
  1. Bump cc-parser to b795

    codeclimate-shipbot authored and maxjacobson committed Jun 11, 2019
Commits on May 16, 2019
  1. Bump cc-parser to b784

    codeclimate-shipbot authored and maxjacobson committed May 16, 2019
  2. Migrate to Circle 2.0

    maxjacobson committed May 16, 2019
Commits on Oct 1, 2018
  1. README: update installation (#337)

    wfleming committed Oct 1, 2018
    * README: update installation
    There is no `engines:enable` command anymore, and duplication is on by default.
    * README: fix numbering of installation list
Commits on Sep 20, 2018
  1. Fix typo

    dblandin committed Sep 20, 2018
  2. Document Python 3 support

    dblandin committed Sep 20, 2018
    Configuration is required to enable Python 3 support during analysis.
Commits on Sep 19, 2018
  1. Add .py3 pattern only when Python 3 language is specified

    dblandin committed Sep 17, 2018
    Files containing Python 3 code may have either a `.py` or the less
    common `.py3` file extension. Python 2 code should only have the `.py`
    file extension, unless it's an executable file targeting a Python
    interpreter with a shebang.
    This allows the file patterns to be dynamic depending on the
    configuration value.
Commits on Sep 14, 2018
  1. Add .py3 extension to python file patterns

    dblandin committed Sep 14, 2018
    Our Python parser already supports both Python 2 and Python 3 source
    code. While most Python 3 files share the same `.py` file extension used
    for Python 2 files, some projects use the `.py3` file extension.
Commits on Jul 23, 2018
  1. Add C# duplication checks. (#331)

    larkinscott committed Jul 23, 2018
    * Add C# duplication checks.
    * Require C# and add to languages, engine config spec
Commits on Jul 20, 2018
  1. Bump cc-parser to b772 (#330)

    larkinscott committed Jul 20, 2018
  2. Remove docker login step from circle yml (#329)

    larkinscott and maxjacobson committed Jul 20, 2018
    This removes the docker login step from our Circle yml. The idea is
    that this is pulling the parser image, which was private when we added
    this step. However, the parser image is now public.
    This is also blocking OSS contributions from users who have forked
    duplication, since Circle fails at this step on forks.
    Co-authored-by: Max Jacobson <>
Commits on Jun 22, 2018
  1. Add support to scala (#324)

    filipesperandio committed Jun 22, 2018
    * Add support to scala
    * Filter imports by default
Commits on Jun 14, 2018
  1. Increase Kotlin duplication mass threshold (#323)

    larkinscott committed Jun 14, 2018
Commits on Jun 12, 2018
  1. Added kotlin duplication checks (#320)

    hershamin authored and larkinscott committed Jun 12, 2018
    * Added Kotlin duplication checks
    * Added comment doc and comments to ignore
    * Shorten the example comments to a few lines
    * Sort alphabetically
  2. Bump cc-parser to b764 (#322)

    larkinscott committed Jun 12, 2018
Commits on May 31, 2018
  1. Bump cc-parser to b754

    codeclimate-shipbot authored and chrishulton committed May 31, 2018
Commits on May 21, 2018
  1. Simple refactoring between javascript and typescript. (#317)

    zenspider authored and ale7714 committed May 21, 2018
    They're identical except for data in consts. This had to switch up how
    the consts were accessed on the JS side but is semantically the same,
    just more explicit.
  2. Typescript improvements (#316)

    zenspider authored and ale7714 committed May 21, 2018
    * Consistency fixes for javascript/main.rb.
    * Consistency fixes for typescript/main.rb
    * Brought over 99% of the filter improvements from javascript to typescript.
    I didn't bring over the directives filter as I don't see that in
    typescript (yet).
    Otherwise, the files are now nearly identical. This is begging for one
    to be a subclass of the other w/ just the name/extension differences.
Commits on May 17, 2018
  1. Fixed a nil exception when an empty file gets parsed as s(:_unknown). (

    zenspider authored and ale7714 committed May 17, 2018
    Who knew? :shrug:
  2. Update for filtering (#314)

    zenspider authored and ale7714 committed May 17, 2018
    * Added post_filter option to CCFlay (essentially flay 2.11's filtering).
    This is wired up via a new config option "post_filters".
    Post filtering happens BEFORE prune, so they get run before
    conservative/liberal pruning happens, which essentially needs be last
    to make sense.
    * Added sexp filtering and transforming for javascript to improve results.
    Added DEFAULT_POST_FILTERS to remove NUKE pseudo-nodes and Program
    Added transform_sexp to transform top-level :body node to NUKE.
    Wrapped the top level sexp so the whole tree gets processed. This is
    probably a bug in CCD and/or flay.
Commits on May 2, 2018
  1. Move flay to do pre-filtering, not post-filtering. (#313)

    zenspider authored and ale7714 committed May 2, 2018
    * Bump flay and sexp_processor for new pre-filtering option.
    This also removes json, as that ships with every ruby these days. I
    had trouble building it, which seems unnecessary to even do.
    I *think* I manually updated this lockfile properly. I don't have
    /home/app/codeclimate-parser-client so I don't know how you're
    supposed to use bundler properly. I basically updated and then carved
    out some of the diffs until everything ran clean.
    * [WIP] roll back #206
    This has been merged upstream.
    * [WIP] remove `delete_comments!` in favor of using `filters`
    * Improved filtering of "false positives" for various languages.
    + Fixed filtering for go. It was too narrow.
    + Improved engine_conf in most specs to allow for variable mass thresholds.
    + Ensured that filter specs have actual bodies so we're not wiping everything.
    * Bump flay, ruby_parser, and sexp_processor.
Commits on Apr 27, 2018
  1. Bump cc-parser to b745 (#312) - includes scala parser

    filipesperandio committed Apr 27, 2018
Commits on Apr 25, 2018
  1. Bump cc-parser to b736 (#311)

    larkinscott committed Apr 25, 2018
Commits on Apr 23, 2018
  1. Fix count_threshold example configuration

    kankje authored and wfleming committed Apr 19, 2018
Commits on Apr 10, 2018
  1. Add `make bundle` command

    toddmazierski committed Apr 9, 2018
    Add a `make bundle` command. Like our other projects, it uses a
    `BUNDLE_ARGS` environment variable so sub-commands like `update`,
    `list`, etc. can be used.
Commits on Apr 9, 2018
  1. Bump cc-parser to b690 (#308)

    larkinscott committed Apr 9, 2018
Commits on Feb 15, 2018
  1. Adds Swift analyzer (#304)

    chrishulton committed Feb 15, 2018
    * [WIP] Adds Swift support
    Using `codeclimate-parser:swift-beta` while under development.
    * Adds Swift analyzer
    Thresholds initialized to match Java analyzer, will be tweaked during
    tuning QA.
    - Import statements are explicitly filtered
    - Comments are ignored due to being skipped at parser level
    * Move off swift-beta parser branch
    The Swift parser changes have been merged into master, so this should
    switch to the standard parser tag.
Commits on Jan 5, 2018
  1. Bump cc-parser to b635

    codeclimate-shipbot authored and toddmazierski committed Jan 5, 2018
    Includes codeclimate/codeclimate-parser#140.
    Configure logger for use in specs.
Commits on Dec 20, 2017

    larkinscott committed Dec 20, 2017
    * Adjust DEFAULT_MASS to 100 and OVERAGE to 10,000
    * Fix tests due to adjustment of mass/overage
Commits on Dec 19, 2017
  1. Filter out "name" and "unresolved" nodes (#299)

    larkinscott committed Dec 19, 2017
    * Properly exclude "name" key from s-expression, as it's basically noise that we don't need to evaluate
    * Update spec with example faulty duplication files, better tests
Commits on Dec 14, 2017
  1. Fix the CC badge

    wfleming committed Dec 12, 2017
    It was an old one
Commits on Dec 13, 2017
  1. Bump cc-parser to b624 (#300)

    larkinscott committed Dec 13, 2017
Commits on Dec 12, 2017
  1. Removes duplicate definition of `skip?` method

    chrishulton committed Dec 12, 2017
    This fixes a bug where issues were being reported when the thresholds
    were not being met, due to a second definition of `skip?` replacing the
    correct one.
    This also improves the specs to properly cover the behavior.
Commits on Dec 7, 2017
  1. Add Go duplication checks to channel/go-beta (#288) (#293)

    larkinscott committed Dec 7, 2017
    * Add main.rb for Go duplication
    * Add spec
    * Add Go to duplication
    * Add default_filters for imports/comments
    * Tune mass threshold
    * Remove unneeded default_filters, update comment filtering
    * Fix indentation nit
You can’t perform that action at this time.