Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Commits on Mar 5, 2012
  1. Quick changes to the local dictionary

    Patrick Brosset authored
Commits on Feb 25, 2012
  1. Enriched the local dictionary of words

    Patrick Brosset authored
Commits on Feb 24, 2012
  1. Small fixes on the naming problems

    Patrick Brosset authored
  2. Fixes #45 were return statements were not counted correctly

    Patrick Brosset authored
    If nested functions had return, they were counted in the parent
    function too. This is because a simple regexp on the body of the
    function was done, therefore counting the child too.
    Now, the function parser, instead of just checking whether there
    is at least one return, counts them.
Commits on Feb 23, 2012
  1. Additional fix for #44

    Patrick Brosset authored
    New problem found whereby a class property initialized
    in a line lower than the one where it's used was not
    reported correctly.
  2. Fixes #44

    Patrick Brosset authored
    Class properties usage was done by regexping the content,
    now this is done by parsing the AST (visit_DOT visitor).
    So, basically it works now.
  3. Revert "Trying to fix the lines too long error with long strings"

    Patrick Brosset authored
    This reverts commit ad497c4.
Commits on Feb 21, 2012
  1. Trying to fix the lines too long error with long strings

    Patrick Brosset authored
    Trying to fix issue #43
    Not sure if what is done makes sense because I have no test
    scripts to run a use cases. For now, just testing if the line
    contains a long string which is at least MAX - 10, if yes
    then no error is returned.
Commits on Feb 18, 2012
  1. Fixes #34

    Patrick Brosset authored
    When visiting functions, we now keep track correctly of
    the nesting (was inverted until now), so that we can
    report variable declaration in the right function as we go.
    Also, now, when reporting an identifier usage, we go up
    the nesting hierarchy to report the usage up to the right
    function were it was first declared
Commits on Feb 17, 2012
  1. Fixes #38 about cyclomatic complexity

    Patrick Brosset authored
    Now cyclomatic complexity is computed as described in #38
Commits on Feb 15, 2012
  1. Finally fixed the file open path problem

    Patrick Brosset authored
    Now, the reviewer takes an optional argument which is the working
    dir.
    When running cleanjs from the command line, or when running the unit
    tests, then this argument is not set, because the normal getcwd()
    returns what is needed.
    In the case of sublime and appengine website, then this argument is
    set to the proper value so that the file can be found.
Commits on Feb 13, 2012
  1. Fixed problem including the config file in Sublime

    Patrick Brosset authored
    Also fixed small problem when syntax error
Commits on Feb 12, 2012
  1. Fixes #41 where functions line parsing was incorrect

    Patrick Brosset authored
    First of all, when a function accesses its `lines`, they now get
    filtered correctly. `lines.all_lines` used to return all lines of
    the file the function was in. Now that's working fine.
    
    Also, the start/end position of the functions was not calculated
    correctly. Fixed this too.
Commits on Feb 10, 2012
  1. Started to implement the message string config for reviewers

    Patrick Brosset authored
    Now reviewers don't have hard-coded messages in them, they
    get passed a config_reader in the constructor and must use
    it to retrieve message strings and (in the future) other
    configuration.
    This is based on the ConfigReader module found in python
  2. Relaxed a bit the AND/OR/BUT comment complexity detector

    Patrick Brosset authored
    It now outputs less warnings. It was warning the user starting
    at 2 of these words only.
Commits on Feb 9, 2012
  1. If var is a nodejs require, don't check the name

    Patrick Brosset authored
    Fixes #31
    var fs = require("fs")
    In the above case, it's fine that variable is named fs because
    this is a pattern in nodejs (and other common module implementations)
    The parser will check that A/ it's a require function call, and
    B/ that the name of the module corresponds to the name of the var
  2. Fixes #28

    Patrick Brosset authored
  3. Fixes #36

    Patrick Brosset authored
    Indeed, as reported in issue #36, the last \n character was
    taken into account in the count for line length
  4. @patrickbrosset
  5. @patrickbrosset
Commits on Feb 6, 2012
  1. Fixes #33

    Patrick Brosset authored
    Now the parser counts the number of times an identifier
    is used within a function. Therefore, we can really
    check if an argument or variable is not used within a
    function.
  2. Fixed problem where var was not found in body of function

    Patrick Brosset authored
    Issue #33 is partially fixed with this, although a far
    better solution would be to count the number of vars per
    function at parsing time rather than regexping the content
Commits on Feb 5, 2012
  1. Fixes #32

    Patrick Brosset authored
    Cannot reproduce this issue.
    Added 2 tests to make sure this works as expected
  2. Removed the useless 'syntax' reviewer

    Patrick Brosset authored
    Now that we are really parsing js before
    the reviewing is done, there is no need
    for a special type of reviewer that checks
    if the syntax is correct.
  3. Fixes #29

    Patrick Brosset authored
    Now, when an argument is not used within a function, if we find
    an occurence of the keyword 'arguments', then we simply output
    a warning saying that it's hard to read.
  4. @patrickbrosset

    Merge pull request #30 from piuccio/master

    patrickbrosset authored
    Default linux keymap
  5. @piuccio

    Default keymap for Linux

    piuccio authored
  6. Parse several var declaration in a row and fixed var usage

    Patrick Brosset authored
    Fixes #26
    Fixes #27
Commits on Feb 4, 2012
  1. Implemented the codesize check for class property name length

    Patrick Brosset authored
    Works the same as for arguments and variables inside functions.
    Fixes #12
  2. First implementation of the unused class property reviewer

    Patrick Brosset authored
    The parser now extract the list of this.... class properties
    And then, the 'unused' reviewer checks all lines to see whether
    these properties are used or not.
    This will typically fail if there are 2 classes in the same file
    that have a property named the same.
    But hey, that's the first implementation. It will require true
    class parsing to be perfect. And the thing is, true class parsing is
    hard to achieve knowing all those frameworks out there that have their
    own way of declaring classes.
    
    Anyway, this is the first step for #12
  3. Added one more test case to cover the issues raised in #25

    Patrick Brosset authored
  4. Fixes #25

    Patrick Brosset authored
    Thanks Julian for raising this issue, indeed it was an issue
    because the argument was appearing at position 0 and my regexp
    was checking for every possibility except line start
  5. Big commit with real js parsing refactoring

    Patrick Brosset authored
    Refactored the line parsing
    Made it work with sublime
    plus other stuff I don't remember
    
    Fixes #3
Commits on Feb 1, 2012
  1. Fixes #20

    Patrick Brosset authored
Something went wrong with that request. Please try again.