#7344 Fix warnings and errors found by LGTM static code analyzer
Opened 6 years ago by cheimes. Modified 5 years ago

LGTM (looks good to me) is a static code analyzer for Open Source projects that can analyse Python, JS, and other code. Static code analysis can find errors in code without actually executing it. It's very useful to find bugs in lines that are rarely executed.

https://lgtm.com/projects/g/freeipa/freeipa/ lists about 120 open errors and 80 open warnings for FreeIPA. Most errors look legit and should be addressed.


Metadata Update from @cheimes:
- Issue assigned to cheimes

6 years ago

master:

  • cae2d99 LGTM: Silence unmatchable dollar
  • 1ed4461 LGTM: Use of exit() or quit()
  • a4f36ee LGTM: Name unused variable in loop
  • d3f43a6 LGTM: Membership test with a non-container
  • de61688 LGTM: Fix exception in permission_del
  • dc599e0 LGTM: Remove redundant assignment
  • 73ee9ff LGTM: Fix multiple use before assignment
  • f60b2c5 LGTM: raise handle_not_found()
  • 5d02c6a LGTM: Use explicit string concatenation
  • beb6d74 LGTM: unnecessary else in for loop

ipa-4-6:

  • 128a127 LGTM: Silence unmatchable dollar
  • c7fb8a1 LGTM: Use of exit() or quit()
  • 298fb68 LGTM: Name unused variable in loop
  • 16eb0a9 LGTM: Membership test with a non-container
  • 4608637 LGTM: Fix exception in permission_del
  • 62f8f02 LGTM: Remove redundant assignment
  • 22a8aba LGTM: Fix multiple use before assignment
  • 1472597 LGTM: raise handle_not_found()
  • 8296ada LGTM: Use explicit string concatenation
  • 7047d6c LGTM: unnecessary else in for loop

The first batch of fixes closed about 90 warnings and errors. FreeIPA is now down to 54 errors and 78 warnings.

Metadata Update from @rcritten:
- Issue priority set to: normal
- Issue set to the milestone: FreeIPA 4.7

6 years ago

Metadata Update from @rcritten:
- Issue set to the milestone: FreeIPA 4.7.1 (was: FreeIPA 4.7)

5 years ago

FreeIPA 4.7 has been released, moving to FreeIPA 4.7.1 milestone

Metadata Update from @rcritten:
- Issue set to the milestone: FreeIPA 4.7.2 (was: FreeIPA 4.7.1)

5 years ago

FreeIPA 4.7.1 has been released, moving to FreeIPA 4.7.2 milestone

There are still a few warnings/suggestions. I skimmed them and most were bogus but probably worth a closer look.

Login to comment on this ticket.

Metadata