Common-Metadata-Repository icon indicating copy to clipboard operation
Common-Metadata-Repository copied to clipboard

CMR-9776: Resolve linter errors & warnings in common-app-lib; add linting config

Open zimzoom opened this issue 1 year ago • 1 comments

Overview

What is the feature/fix?

Fix clj-kondo errors and warnings on common-app-lib.

Also added .clj-kondo to codebase, including config file and imported config from clj-rewrite.

What is the Solution?

See above, followed clj-kondo docs. See comments in config.edn file.

What areas of the application does this impact?

Quality control

Checklist

  • [x ] I have updated/added unit and integration tests that prove my fix is effective or that my feature works
  • [x ] New and existing unit and int tests pass locally and remotely with my changes
  • [x ] I have removed unnecessary/dead code and imports in files I have changed
  • [x ] I have performed a self-review of my own code
  • [x ] I have commented my code, particularly in hard-to-understand areas
  • [x ] I have made corresponding changes to the documentation
  • [x ] My changes generate no new warnings

zimzoom avatar Apr 24 '24 15:04 zimzoom

Codecov Report

Attention: Patch coverage is 57.14286% with 21 lines in your changes are missing coverage. Please review.

Project coverage is 57.80%. Comparing base (289c472) to head (3621d47).

Files Patch % Lines
common-app-lib/src/cmr/common_app/api/routes.clj 0.00% 8 Missing :warning:
...-control-app/src/cmr/access_control/api/routes.clj 0.00% 3 Missing :warning:
.../common_app/api/request_context_user_augmenter.clj 0.00% 3 Missing :warning:
acl-lib/src/cmr/acl/acl_fetcher.clj 50.00% 1 Missing :warning:
common-app-lib/src/cmr/common_app/api/health.clj 0.00% 1 Missing :warning:
.../collections_for_gran_acls_by_concept_id_cache.clj 0.00% 1 Missing :warning:
.../src/cmr/common_app/data/humanizer_alias_cache.clj 0.00% 1 Missing :warning:
common-app-lib/src/cmr/common_app/humanizer.clj 91.66% 0 Missing and 1 partial :warning:
...c/cmr/elastic_utils/search/es_index_name_cache.clj 0.00% 1 Missing :warning:
...-lib/src/cmr/umm_spec/umm_to_xml_mappings/dif9.clj 0.00% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2102      +/-   ##
==========================================
- Coverage   57.81%   57.80%   -0.01%     
==========================================
  Files        1044     1044              
  Lines       70318    70311       -7     
  Branches     1966     1964       -2     
==========================================
- Hits        40653    40645       -8     
  Misses      27808    27808              
- Partials     1857     1858       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Apr 24 '24 17:04 codecov-commenter