nasa / Common-Metadata-Repository

Apache License 2.0
337 stars 92 forks source link

Feature CMR-9779 elastic lint #2115

Closed jceaser closed 4 months ago

jceaser commented 4 months ago

Overview

Lint effort

What is the feature/fix?

Clean up the elastic code using clj-kondo

The project file is also cleaned up to use the latest libraries in the lint profile. Then code changes were made to support clj-kondo, bikeshed, and kibit.

What is the Solution?

There are several commits, each for different cleanup tools like Kondo, bikeshed, and kibit so that reviewers can see which changes were made for each of the tools.

Also, all are2 calls have been converted to are3 in spatial lib. Spacial lib should also not issue Warnings about the abs function.

What areas of the application does this impact?

The elastic utils project and the spatial library have been cleaned up. Only elastic utils has been passed through bikeshed and kibit.

Checklist

Test cleanup, there are now no are2 in spatial lib.

codecov-commenter commented 4 months ago

Codecov Report

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

Project coverage is 57.77%. Comparing base (d3a9ce3) to head (214b56b).

Files Patch % Lines
...tils-lib/src/cmr/elastic_utils/search/es_index.clj 8.33% 22 Missing :warning:
...c/cmr/elastic_utils/search/es_query_to_elastic.clj 0.00% 22 Missing :warning:
.../cmr/elastic_utils/search/access_control_index.clj 0.00% 11 Missing :warning:
...c/cmr/elastic_utils/search/keywords_to_elastic.clj 0.00% 9 Missing :warning:
...c/cmr/elastic_utils/search/es_params_converter.clj 0.00% 8 Missing :warning:
...c/cmr/elastic_utils/search/es_query_validation.clj 0.00% 7 Missing :warning:
...tic-utils-lib/src/cmr/elastic_utils/index_util.clj 0.00% 5 Missing :warning:
...c/cmr/elastic_utils/search/es_index_name_cache.clj 0.00% 5 Missing :warning:
...tils-lib/src/cmr/elastic_utils/datetime_helper.clj 42.85% 4 Missing :warning:
...lib/src/cmr/elastic_utils/search/es_acl_parser.clj 0.00% 4 Missing :warning:
... and 8 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2115 +/- ## ========================================== - Coverage 57.81% 57.77% -0.04% ========================================== Files 1044 1044 Lines 70311 70350 +39 Branches 1967 1965 -2 ========================================== - Hits 40649 40646 -3 - Misses 27807 27845 +38 - Partials 1855 1859 +4 ```

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

jmaeng72 commented 4 months ago

Approved with one last feedback on a lingering unused comment