From 1aeb64f3be0a20fcfe488391eb64904660cce3cd Mon Sep 17 00:00:00 2001 From: Owais Kazi Date: Mon, 11 Apr 2022 23:44:34 +0000 Subject: [PATCH 1/6] Added linter to add new line Signed-off-by: Owais Kazi --- .github/workflows/new-line.yml | 14 ++++++++++++++ .linelint.yml | 20 ++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/new-line.yml create mode 100644 .linelint.yml diff --git a/.github/workflows/new-line.yml b/.github/workflows/new-line.yml new file mode 100644 index 0000000000000..1952630e5bdfa --- /dev/null +++ b/.github/workflows/new-line.yml @@ -0,0 +1,14 @@ +name: Code Hygiene + +on: [push, pull_request] + +jobs: + linelint: + runs-on: ubuntu-latest + name: Check if all files end in newline + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Linelint + uses: fernandrone/linelint@0.0.4 diff --git a/.linelint.yml b/.linelint.yml new file mode 100644 index 0000000000000..c7e8467aecd70 --- /dev/null +++ b/.linelint.yml @@ -0,0 +1,20 @@ +# 'true' will fix files +autofix: true + +ignore: + - .git/ + - .gradle/ + - '*.sha1' + - '*.txt' + - 'buildSrc/src/testKit/opensearch.build/LICENSE' + - 'buildSrc/src/testKit/opensearch.build/NOTICE' + - 'server/licenses/apache-log4j-extras-DEPENDENCIES' + +rules: + # checks if file ends in a newline character + end-of-file: + # set to true to enable this rule + enable: true + + # if true also checks if file ends in a single newline character + single-new-line: true From 5400cd447fd4ee7c43cf53d541b6edb508544166 Mon Sep 17 00:00:00 2001 From: Owais Kazi Date: Tue, 12 Apr 2022 18:25:47 +0000 Subject: [PATCH 2/6] Fixed new lines Signed-off-by: Owais Kazi --- .ci/dockerOnLinuxExclusions | 2 +- .github/CODEOWNERS | 3 +-- .github/workflows/delete_backport_branch.yml | 2 +- .github/workflows/links.yml | 2 +- .github/workflows/wrapper.yml | 2 +- .idea/inspectionProfiles/Project_Default.xml | 2 +- .linelint.yml | 2 ++ README.md | 2 +- RELEASING.md | 2 +- SECURITY.md | 2 +- .../org.eclipse.core.resources.prefs | 2 +- .../src/main/resources/minimumGradleVersion | 2 +- .../src/testKit/testingConventions/build.gradle | 3 --- .../testKit/testingConventions/settings.gradle | 2 +- .../src/testKit/thirdPartyAudit/settings.gradle | 2 +- .../prepare_release_update_documentation.py | 1 - dev-tools/signoff-check.sh | 1 - .../resources/rest-api-spec/test/10_info.yml | 1 - .../resources/rest-api-spec/test/11_nodes.yml | 1 - distribution/src/bin/opensearch-env-from-file | 1 - distribution/src/bin/opensearch-env.bat | 1 - doc-tools/build.gradle | 1 - .../missingdoclet/MissingDoclet.class | Bin 0 -> 14156 bytes libs/dissect/build.gradle | 1 - .../src/test/resources/specification/tests.json | 2 +- libs/geo/build.gradle | 1 - libs/grok/src/main/resources/patterns/exim | 1 - libs/grok/src/main/resources/patterns/junos | 1 - .../grok/src/main/resources/patterns/postgresql | 1 - libs/ssl-config/build.gradle | 1 - .../analysis/common/cjk_analysis.json | 2 +- .../analysis/common/pattern_capture.json | 2 +- .../analysis-common/60_analysis_scripting.yml | 1 - .../test/cluster.stats/10_analysis_stats.yml | 1 - .../test/indices.analyze/10_synonyms.yml | 1 - .../test/search.query/60_synonym_graph.yml | 1 - .../test/search.query/70_intervals.yml | 1 - .../test/ingest/220_drop_processor.yml | 1 - modules/ingest-user-agent/build.gradle | 1 - .../ingest-user-agent/src/test/test-regexes.yml | 2 +- modules/lang-expression/build.gradle | 1 - .../src/main/antlr/PainlessLexer.g4 | 2 +- .../test/painless/100_terms_agg.yml | 1 - modules/opensearch-dashboards/build.gradle | 1 - modules/repository-url/build.gradle | 1 - modules/systemd/build.gradle | 1 - .../index/analysis/KeywordTokenizer.rbbi | 2 +- plugins/analysis-kuromoji/build.gradle | 1 - .../test/analysis_phonetic/10_metaphone.yml | 1 - .../analysis_phonetic/20_double_metaphone.yml | 1 - .../test/analysis_phonetic/30_beider_morse.yml | 1 - .../analysis_phonetic/50_daitch_mokotoff.yml | 1 - plugins/analysis-smartcn/build.gradle | 1 - .../attributes/google-compute-default-zone | 2 +- .../gce/computeMetadata/v1/project/project-id | 2 +- plugins/examples/build.gradle | 1 - plugins/examples/custom-settings/build.gradle | 1 - .../custom-settings/src/main/config/custom.yml | 2 +- plugins/examples/rest-handler/build.gradle | 1 - .../examples/script-expert-scoring/build.gradle | 1 - .../test/sample-files/asciidoc.asciidoc | 1 - .../test/ingest_attachment/10_basic.yml | 1 - .../test/mapper_annotatedtext/10_basic.yml | 1 - .../test/hdfs_repository/30_snapshot.yml | 1 - .../test/secure_hdfs_repository/30_snapshot.yml | 1 - plugins/transport-nio/build.gradle | 1 - qa/die-with-dignity/build.gradle | 1 - .../org/opensearch/common/cli/tool-cmd1.help | 2 +- .../org/opensearch/common/cli/tool.help | 2 +- .../test/multi_cluster/70_skip_shards.yml | 1 - .../rest-api-spec/test/old_cluster/10_basic.yml | 1 - .../test/old_cluster/20_date_range.yml | 2 -- .../test/upgraded_cluster/10_basic.yml | 2 -- .../test/upgraded_cluster/20_date_range.yml | 1 - .../test/ingest_mustache/10_ingest_disabled.yml | 1 - .../50_script_processor_using_painless.yml | 1 - .../60_pipeline_timestamp_date_mapping.yml | 1 - .../src/test/resources/scripts/master.painless | 2 +- .../SmokeTestPluginsClientYamlTestSuiteIT.java | 1 - .../opensearch.release-notes-1.0.0-rc1.md | 2 -- release-notes/opensearch.release-notes-1.1.0.md | 2 -- release-notes/opensearch.release-notes-1.2.0.md | 1 - release-notes/opensearch.release-notes-1.2.4.md | 2 -- release-notes/opensearch.release-notes-1.3.0.md | 2 -- .../rest-api-spec/test/bulk/10_basic.yml | 1 - .../test/bulk/20_list_of_strings.yml | 1 - .../rest-api-spec/test/bulk/30_big_string.yml | 1 - .../rest-api-spec/test/bulk/40_source.yml | 1 - .../rest-api-spec/test/cat.nodes/10_basic.yml | 1 - .../test/cluster.pending_tasks/10_basic.yml | 1 - .../test/cluster.remote_info/10_info.yml | 1 - .../10_basic.yml | 1 - .../rest-api-spec/test/create/40_routing.yml | 1 - .../rest-api-spec/test/delete/30_routing.yml | 1 - .../test/get/15_default_values.yml | 1 - .../rest-api-spec/test/get/20_stored_fields.yml | 2 -- .../rest-api-spec/test/get/40_routing.yml | 1 - .../rest-api-spec/test/get/90_versions.yml | 1 - .../rest-api-spec/test/index/40_routing.yml | 1 - .../indices.delete_alias/all_path_options.yml | 1 - .../test/indices.exists_template/10_basic.yml | 1 - .../test/indices.forcemerge/10_basic.yml | 2 -- .../40_missing_index.yml | 2 -- .../50_field_wildcards.yml | 1 - .../20_get_missing.yml | 1 - .../indices.get_mapping/30_missing_index.yml | 1 - .../test/indices.get_settings/20_aliases.yml | 1 - .../indices.get_template/20_get_missing.yml | 1 - .../test/indices.open/20_multiple_indices.yml | 1 - .../test/indices.put_alias/all_path_options.yml | 1 - .../test/indices.put_mapping/10_basic.yml | 1 - .../indices.put_mapping/all_path_options.yml | 1 - .../indices.put_settings/all_path_options.yml | 1 - .../test/indices.refresh/10_basic.yml | 1 - .../test/indices.rollover/10_basic.yml | 1 - .../indices.rollover/20_max_doc_condition.yml | 1 - .../test/indices.update_aliases/20_routing.yml | 1 - .../test/indices.upgrade/10_basic.yml | 1 - .../test/info/20_lucene_version.yml | 3 --- .../test/nodes.stats/11_indices_metrics.yml | 1 - .../rest-api-spec/test/ping/10_ping.yml | 1 - .../test/search.aggregation/240_max_buckets.yml | 1 - .../test/search.aggregation/250_moving_fn.yml | 1 - .../350_variable_width_histogram.yml | 1 - .../test/search/10_source_filtering.yml | 1 - .../search/140_pre_filter_search_shards.yml | 1 - .../test/search/230_interval_query.yml | 2 -- .../test/search/240_date_nanos.yml | 1 - .../test/search/90_search_after.yml | 1 - .../rest-api-spec/test/update/20_doc_upsert.yml | 2 -- .../test/update/22_doc_as_upsert.yml | 2 -- .../rest-api-spec/test/update/35_if_seq_no.yml | 1 - .../rest-api-spec/test/update/40_routing.yml | 1 - .../test/update/85_fields_meta.yml | 2 -- sandbox/plugins/concurrent-search/build.gradle | 2 +- .../search/aggregations/bucket/package-info | 1 - server/src/test/resources/config/opensearch.yml | 1 - .../conf_dir/hunspell/en_US_custom/settings.yml | 2 +- .../action/admin/invalid.txt.keystore | 1 - .../opensearch/action/bulk/simple-bulk11.json | 2 +- .../fieldstats-index-constraints-request.json | 2 +- .../action/search/simple-msearch5.json | 2 +- .../index/analysis/shingle_analysis.json | 2 +- .../index/analysis/shingle_analysis2.json | 2 +- .../org/opensearch/index/analysis/stop.json | 2 +- .../dynamictemplate/genericstore/test-data.json | 2 +- .../dynamictemplate/pathmatch/test-data.json | 2 +- .../dynamictemplate/simple/test-data.json | 2 +- .../mapper/multifield/merge/test-data.json | 2 +- .../index/mapper/multifield/test-data.json | 2 +- settings.gradle | 1 - .../src/main/resources/provision/addprinc.sh | 2 +- .../main/resources/provision/krb5.conf.template | 1 - test/fixtures/minio-fixture/build.gradle | 1 - .../org.mockito.plugins.MockMaker | 2 +- .../test/suite1/20_another_test.yml | 1 - 156 files changed, 42 insertions(+), 172 deletions(-) create mode 100644 doc-tools/missing-doclet/bin/main/org/opensearch/missingdoclet/MissingDoclet.class diff --git a/.ci/dockerOnLinuxExclusions b/.ci/dockerOnLinuxExclusions index 8061248a87df4..dd518c7043e2f 100644 --- a/.ci/dockerOnLinuxExclusions +++ b/.ci/dockerOnLinuxExclusions @@ -12,4 +12,4 @@ ol-7.7 sles-12.3 # older version used in Vagrant image sles-12.5 sles-15.1 -sles-15.2 \ No newline at end of file +sles-15.2 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5dfa9099866d1..d038ec8b537d2 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,2 @@ # This should match the owning team set up in https://github.com/orgs/opensearch-project/teams -* @opensearch-project/opensearch-core - +* @opensearch-project/opensearch-core \ No newline at end of file diff --git a/.github/workflows/delete_backport_branch.yml b/.github/workflows/delete_backport_branch.yml index d654df6b40257..387a124b8cb6a 100644 --- a/.github/workflows/delete_backport_branch.yml +++ b/.github/workflows/delete_backport_branch.yml @@ -12,4 +12,4 @@ jobs: - name: Delete merged branch uses: SvanBoxel/delete-merged-branch@main env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index 21fb7ab9086ee..ca05aee8be378 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -16,4 +16,4 @@ jobs: args: --accept=200,403,429 --exclude-mail **/*.html **/*.md **/*.txt **/*.json --exclude-file .lychee.excludes fail: true env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/wrapper.yml b/.github/workflows/wrapper.yml index d577699b66dc0..be5e7afb56ba0 100644 --- a/.github/workflows/wrapper.yml +++ b/.github/workflows/wrapper.yml @@ -7,4 +7,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: gradle/wrapper-validation-action@v1 \ No newline at end of file + - uses: gradle/wrapper-validation-action@v1 diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 5cf789707c58c..43a48d48b0613 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -6,4 +6,4 @@