src-d / style-analyzer

Lookout Style Analyzer: fixing code formatting and typos during code reviews
GNU Affero General Public License v3.0
32 stars 21 forks source link

Store old identifiers in the IdTyposModel #735

Closed irinakhismatullina closed 5 years ago

irinakhismatullina commented 5 years ago
  1. Create IdTyposModel to store known identifiers after training.
  2. Small optimizations in check_identifiers():
    • Don't check the same identifier several times
    • Use return_all=False. Before comments were generated for all new identifiers, now only for corrected ones. We could still do it with return_all=True, but it would be more difficult, and more data would be passed, we don't need that.
  3. Add min_token_length parameter, for now it's turned off, but can be used in the future (to not check one-letter tokens, for example).
vmarkovtsev commented 5 years ago

@irinakhismatullina There is a conflict after merging @zurk's PR

vmarkovtsev commented 5 years ago

@irinakhismatullina No conflicts now, but the CI failed

irinakhismatullina commented 5 years ago

Yep, working on it. Something with the reporter tests, we're figuring it out with @zurk

irinakhismatullina commented 5 years ago

@vmarkovtsev Added tests to check that the feature works, ready to review/merge.