Skip to content

Releases: lyxell/logifix

v0.6.0

13 Aug 18:03
Compare
Choose a tag to compare

New features

CLI

  • Remove dependency on libgit2
  • Do not display SonarQube ids by default

Rules

  • Add rule remove_redundant_casts
  • Add rule remove_redundant_parentheses
  • Add rule remove_redundant_try_blocks
  • Add rule fix_inefficient_calls_to_foreach_list_add
  • Add rule fix_inefficient_map_access
  • Add rule simplify_code_using_lambda_expressions
  • Add rule simplify_code_using_streams
  • Improve detection for simplify_inverted_boolean_expressions
  • Improve detection for remove_redundant_parentheses

Bug fixes

CLI

  • Detect line terminators

Rules

  • Reduce false positives for fix_inefficient_map_access
  • Reduce false positives for fix_null_pointer_exceptions_by_changing_the_order_of_arguments_in_string_comparison

v0.5.2

09 Jul 09:41
Compare
Choose a tag to compare

Bug fixes

  • Fix a data race that could cause segfault under some circumstances

v0.5.1

09 Jul 00:45
Compare
Choose a tag to compare

Bug fixes

CLI

  • Fix bug where patch headers would be printed incorrectly

Rules

  • Fix false positives for remove_empty_statements

  • Fix false positives for remove_empty_finally_blocks (#54)

  • Fix false positives for remove_unused_imports

v0.5.0

08 Jul 12:40
Compare
Choose a tag to compare

New features

  • Refactored rewrite system, can handle deeper and more complex rewrites

  • Added rule remove_unused_assignments

Bug fixes

CLI

  • Added missing rule descriptions

v0.4.1

08 Jul 07:56
Compare
Choose a tag to compare

Bug fixes

CLI

  • Improve behavior on SIGINT, make sure terminal is restored

v0.4.0

06 Jul 21:39
Compare
Choose a tag to compare
demo.mp4

New features

CLI

  • Prettier diffs with line numbers
  • Tabled rule view

Rules

  • Added rule
    remove_unnecessary_null_check_before_string_equals_comparison
  • Renamed rule fix_resource_leaks => fix_potential_resource_leaks
  • Renamed rule improve_precision_of_calls_to_bigdecimal =>
    fix_imprecise_calls_to_bigdecimal
  • Renamed rule provide_parameterized_types_for_generics =>
    fix_raw_use_of_generic_class
  • Renamed rule
    remove_unnecessary_variable_declarations_before_return_statement
    => remove_unnecessary_declarations_above_return_statements
  • Renamed rule replace_lambda_with_method_reference =>
    simplify_code_using_method_references

Bugfixes

CLI

  • Fixed a bug where control codes would be printed to stdout when
    generating a patch

v0.3.0

06 Jul 03:01
fbcafa5
Compare
Choose a tag to compare

New features

Rules

  • Added rule remove_unused_imports
  • Added rule remove_empty_if_statements
  • Rule avoid_raw_types has been renamed to provide_parameterized_type_for_generic

v0.2.0

05 Jul 00:17
Compare
Choose a tag to compare
demo.mp4

New features

  • Unlimited rewrite depth
  • New interactive cli interface
  • There is no longer a need to specify which rules to apply when running cli interactively, just run logifix path/to/src
  • New format for cli flags, see logifix --help
  • ~20 new rules added

Implemented rules

  • Avoid raw types (S3740, N/A)
  • Fix broken null checks (S2259, BrokenNullCheck)
  • Fix calls to Thread.run (S1217, DontCallThreadRun)
  • Fix comparisons of atomic classes (S2204, N/A)
  • Fix comparisons of objects with null (S2159, EqualsNull)
  • Fix null pointer exceptions by inverting string comparison (S1132, LiteralsFirstInComparison)
  • Fix null returns in toString methods (S2225, N/A)
  • Fix references to Collections.EMPTY_LIST, EMPTY_MAP and EMPTY_SET (S1596, N/A)
  • Fix resource leaks (S2095, CloseResource)
  • Improve precision of calls to BigDecimal (S2111, AvoidDecimalLiteralsInBigDecimalConstructor)
  • Remove empty declarations (S1116, N/A)
  • Remove empty finally blocks (N/A, EmptyFinallyBlock)
  • Remove empty nested blocks (S108, EmptyStatementBlock)
  • Remove empty statements (S1116, EmptyStatementNotInLoop)
  • Remove empty try blocks (N/A, EmptyTryBlock)
  • Remove redundant calls to close (S4087, N/A)
  • Remove repeated unary operators (S2761, AvoidMultipleUnaryOperators)
  • Remove unnecessary calls to String.valueOf (S1153, UselessStringValueOf)
  • Remove unnecessary return statements (S3626, UnnecessaryReturn)
  • Remove unnecessary variable declarations before return statements (S1488, UnnecessaryLocalBeforeReturn)
  • Remove unused local variables (S1481, UnusedLocalVariable)
  • Replace lambda with method reference (S1612, N/A)
  • Simplify boolean expressions (S1125, SimplifyBooleanExpressions)
  • Simplify calls to Collection.removeAll (S2114, N/A)
  • Simplify calls to constructor for string conversion (S2131, N/A)
  • Simplify calls to String.substring and String.startsWith (S4635, N/A)
  • Simplify calls to String.substring (S2121, N/A)
  • Simplify code using Collection.isEmpty (S1155, UseCollectionIsEmpty)
  • Simplify code using Map.computeIfAbsent (S3824, N/A)
  • Simplify inverted boolean expressions (S1940, LogicInversion)
  • Simplify lambdas containing a block with only one statement (S1602, N/A)
  • Simplify return of boolean expressions (S1126, SimplifyBooleanReturns)
  • Simplify ternary conditional expressions (S1125, SimplifiedTernary)

v0.1.0

01 Jun 12:44
Compare
Choose a tag to compare

First release.