├── .asf.yaml
├── .buildkite
└── pipeline.yml
├── .circleci
└── config.yml
├── .cirrus.yml
├── .codespellignorelines
├── .codespellignorewords
├── .codespellrc
├── .gitattributes
├── .github
├── dependabot.yml
└── workflows
│ ├── action-test.yml
│ ├── ghcr.yml
│ ├── linkcheck.yml
│ └── yetus.yml
├── .gitignore
├── .gitlab-ci.yml
├── .hadolint.yaml
├── .jshintignore
├── .linkcheckerrc
├── .markdownlint.yaml
├── .mvn
└── maven.config
├── .rubocop.yml
├── .semaphore
├── semaphore-build.sh
└── semaphore.yml
├── .shellcheckrc
├── .travis.yml
├── .yetus
├── blanks-eol.txt
├── blanks-tabs.txt
├── detsecrets-ignored-hashes.txt
├── excludes.txt
└── personality.sh
├── Dockerfile
├── Jenkinsfile
├── LICENSE
├── NOTICE
├── README.md
├── asf-site-src
├── .dockerignore
├── Dockerfile
├── Gemfile
├── Gemfile.lock
├── README.md
├── config.rb
├── data
│ ├── htaccess.yml
│ └── versions.yml
├── pom.xml
├── ruby27_fix_uri.rb
├── source
│ ├── .htaccess.apache.erb
│ ├── _footer.html.erb
│ ├── _header.html.erb
│ ├── assets
│ │ ├── config.json
│ │ ├── css
│ │ │ ├── bootstrap-theme.css
│ │ │ ├── bootstrap-theme.css.map
│ │ │ ├── bootstrap-theme.min.css
│ │ │ ├── bootstrap.css
│ │ │ ├── bootstrap.css.map
│ │ │ ├── bootstrap.min.css
│ │ │ ├── font-awesome.css
│ │ │ └── font-awesome.min.css
│ │ ├── fonts
│ │ │ ├── FontAwesome.otf
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.svg
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ ├── fontawesome-webfont.woff
│ │ │ ├── fontawesome-webfont.woff2
│ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ └── glyphicons-halflings-regular.woff2
│ │ ├── img
│ │ │ ├── favicon.ico
│ │ │ └── yetus_logo.png
│ │ └── js
│ │ │ ├── bootstrap.js
│ │ │ ├── bootstrap.min.js
│ │ │ └── jquery-2.1.4.min.js
│ ├── contribute.html.md
│ ├── contribute
│ │ ├── releases.html.md
│ │ └── website.html.md
│ ├── doap_yetus.rdf
│ ├── documentation
│ │ ├── history.html.md
│ │ ├── in-progress.html.md
│ │ └── in-progress
│ │ │ ├── interface-classification.html.md
│ │ │ ├── precommit
│ │ │ ├── admin.html.md
│ │ │ ├── advanced.html.md
│ │ │ ├── apidocs-index.html.md
│ │ │ ├── architecture.html.md
│ │ │ ├── bugsystems.html.md
│ │ │ ├── buildtools.html.md
│ │ │ ├── docker-cleanup.html.md
│ │ │ ├── docker.html.md
│ │ │ ├── github-status-recovery.html.md
│ │ │ ├── glossary.html.md
│ │ │ ├── index.html.md
│ │ │ ├── patchnames.html.md
│ │ │ ├── plugins
│ │ │ │ ├── ansiblelint.html.md
│ │ │ │ ├── ant.html.md
│ │ │ │ ├── asflicense.html.md
│ │ │ │ ├── author.html.md
│ │ │ │ ├── autoconf.html.md
│ │ │ │ ├── blanks.html.md
│ │ │ │ ├── briefreport.html.md
│ │ │ │ ├── buf.html.md
│ │ │ │ ├── bugzilla.html.md
│ │ │ │ ├── cc.html.md
│ │ │ │ ├── checkmake.html.md
│ │ │ │ ├── checkstyle.html.md
│ │ │ │ ├── cmake.html.md
│ │ │ │ ├── codespell.html.md
│ │ │ │ ├── compile.html.md
│ │ │ │ ├── ctest.html.md
│ │ │ │ ├── detsecrets.html.md
│ │ │ │ ├── dupname.html.md
│ │ │ │ ├── github.html.md
│ │ │ │ ├── gitlab.html.md
│ │ │ │ ├── golang.html.md
│ │ │ │ ├── golangcilint.html.md
│ │ │ │ ├── gradle.html.md
│ │ │ │ ├── hadolint.html.md
│ │ │ │ ├── htmlout-example.html
│ │ │ │ ├── htmlout.html.md
│ │ │ │ ├── javac.html.md
│ │ │ │ ├── javadoc.html.md
│ │ │ │ ├── jira.html.md
│ │ │ │ ├── jshint.html.md
│ │ │ │ ├── jsonlint.html.md
│ │ │ │ ├── junit-bugsystem.html.md
│ │ │ │ ├── junit-testformat.html.md
│ │ │ │ ├── make.html.md
│ │ │ │ ├── markdownlint.html.md
│ │ │ │ ├── maven.html.md
│ │ │ │ ├── nobuild.html.md
│ │ │ │ ├── pathlen.html.md
│ │ │ │ ├── perlcritic.html.md
│ │ │ │ ├── pylint.html.md
│ │ │ │ ├── revive.html.md
│ │ │ │ ├── rubocop.html.md
│ │ │ │ ├── scalac.html.md
│ │ │ │ ├── scaladoc.html.md
│ │ │ │ ├── shellcheck.html.md
│ │ │ │ ├── slack.html.md
│ │ │ │ ├── spotbugs.html.md
│ │ │ │ ├── tap.html.md
│ │ │ │ ├── template.html.md
│ │ │ │ ├── unitveto.html.md
│ │ │ │ ├── xml.html.md
│ │ │ │ └── yamllint.html.md
│ │ │ ├── qbt.html.md
│ │ │ ├── robots
│ │ │ │ ├── azurepipelines.html.md
│ │ │ │ ├── buildkite.html.md
│ │ │ │ ├── circleci.html.md
│ │ │ │ ├── cirrusci.html.md
│ │ │ │ ├── githubactions.html.md
│ │ │ │ ├── gitlabci.html.md
│ │ │ │ ├── index.html.md
│ │ │ │ ├── jenkins.html.md
│ │ │ │ ├── semaphoreci.html.md
│ │ │ │ └── travisci.html.md
│ │ │ ├── smart-apply-patch.html.md
│ │ │ ├── testformats.html.md
│ │ │ └── usage-intro.html.md
│ │ │ ├── releasedocmaker.html.md
│ │ │ ├── shelldocs.html.md
│ │ │ └── yetus-maven-plugin.html.md
│ ├── downloads
│ │ ├── .gitignore
│ │ └── index.html.md.erb
│ ├── index.html.md
│ ├── layouts
│ │ └── layout.html.erb
│ ├── mailinglists.html.md
│ └── yetus-docker-image.html.md
└── src
│ └── main
│ └── assemblies
│ └── asf-site.xml
├── audience-annotations-component
├── audience-annotations
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ ├── assemblies
│ │ │ └── audience-annotations.xml
│ │ └── java
│ │ │ └── org
│ │ │ └── apache
│ │ │ └── yetus
│ │ │ └── audience
│ │ │ ├── InterfaceAudience.java
│ │ │ ├── InterfaceStability.java
│ │ │ ├── package-info.java
│ │ │ └── tools
│ │ │ ├── DocletEnvironmentProcessor.java
│ │ │ ├── ExcludePrivateAnnotationsStandardDoclet.java
│ │ │ ├── IncludePublicAnnotationsStandardDoclet.java
│ │ │ ├── StabilityOptions.java
│ │ │ └── package-info.java
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── apache
│ │ └── yetus
│ │ └── audience
│ │ └── tools
│ │ ├── DocletEnvironmentProcessorTest.java
│ │ └── MockElement.java
└── pom.xml
├── entrypoint.sh
├── hooks
├── build
└── push
├── pom.xml
├── precommit
├── pom.xml
└── src
│ ├── main
│ ├── python
│ │ ├── jenkins-admin.py
│ │ └── unit-test-filter-file.example
│ └── shell
│ │ ├── buildkite-recovery.sh
│ │ ├── coprocs.d
│ │ ├── README
│ │ ├── e_a_r_helper.sh
│ │ ├── process_counter.sh
│ │ └── reaper.sh
│ │ ├── core.d
│ │ ├── 00-yetuslib.sh
│ │ ├── 01-common.sh
│ │ ├── builtin-bugsystem.sh
│ │ ├── builtin-personality.sh
│ │ ├── change-analysis.sh
│ │ ├── docker.sh
│ │ ├── linecomments.sh
│ │ ├── patchfiles.sh
│ │ └── reaper.sh
│ │ ├── docker-cleanup.sh
│ │ ├── github-status-recovery.sh
│ │ ├── it
│ │ └── it-tp.sh
│ │ ├── plugins.d
│ │ ├── ansiblelint.sh
│ │ ├── ant.sh
│ │ ├── asflicense.sh
│ │ ├── author.sh
│ │ ├── autoconf.sh
│ │ ├── blanks.sh
│ │ ├── briefreport.sh
│ │ ├── buf.sh
│ │ ├── bugzilla.sh
│ │ ├── cc.sh
│ │ ├── checkmake.sh
│ │ ├── checkstyle.sh
│ │ ├── cmake.sh
│ │ ├── codespell.sh
│ │ ├── csvout.sh
│ │ ├── ctest.sh
│ │ ├── detsecrets.sh
│ │ ├── detsecrets_parse.py
│ │ ├── dupname.sh
│ │ ├── github.sh
│ │ ├── gitlab.sh
│ │ ├── golang.sh
│ │ ├── golangci.sh
│ │ ├── gradle.sh
│ │ ├── hadolint.sh
│ │ ├── htmlout.sh
│ │ ├── java.sh
│ │ ├── jira.sh
│ │ ├── jshint.sh
│ │ ├── jsonlint.sh
│ │ ├── junit.sh
│ │ ├── make.sh
│ │ ├── markdownlint.sh
│ │ ├── maven.sh
│ │ ├── nobuild.sh
│ │ ├── pathlen.sh
│ │ ├── perlcritic.sh
│ │ ├── pylint.sh
│ │ ├── revive.sh
│ │ ├── rubocop.sh
│ │ ├── scala.sh
│ │ ├── shellcheck.sh
│ │ ├── shelldocs.sh
│ │ ├── slack.sh
│ │ ├── spotbugs.sh
│ │ ├── tap.sh
│ │ ├── test4tests.sh
│ │ ├── unitveto.sh
│ │ ├── xml.sh
│ │ └── yamllint.sh
│ │ ├── robots.d
│ │ ├── azurepipelines.sh
│ │ ├── buildkite.sh
│ │ ├── circleci.sh
│ │ ├── cirrusci.sh
│ │ ├── githubactions.sh
│ │ ├── gitlabci.sh
│ │ ├── jenkins.sh
│ │ ├── semaphoreci.sh
│ │ └── travisci.sh
│ │ ├── smart-apply-patch.sh
│ │ ├── test-patch-docker
│ │ ├── Dockerfile
│ │ ├── Dockerfile.patchspecific
│ │ └── launch-test-patch.sh
│ │ └── test-patch.sh
│ └── test
│ ├── resources
│ ├── Makefile
│ ├── arrayfiletest.txt
│ ├── blanks.txt
│ ├── brokenfiles
│ │ ├── 1.txt
│ │ ├── 2.txt
│ │ ├── 3.txt
│ │ ├── 4.txt
│ │ ├── a1.txt
│ │ ├── a2.txt
│ │ ├── a3.txt
│ │ └── perlcritic.pl
│ └── i18n
│ │ ├── ß.json
│ │ ├── ä.xml
│ │ └── ç.yaml
│ └── shell
│ ├── functions_test_helper.bash
│ ├── run-bats.sh
│ ├── yetus_abs.bats
│ ├── yetus_add_array_element.bats
│ ├── yetus_array_contains.bats
│ ├── yetus_array_to_comma.bats
│ ├── yetus_del_array_element.bats
│ ├── yetus_file_to_array.bats
│ ├── yetus_find_deepest_directory.bats
│ ├── yetus_relative_dir.bats
│ ├── yetus_sort_and_unique_array.bats
│ ├── yetus_sort_array.bats
│ └── yetus_trim.bats
├── release
├── build-and-sign.sh
├── initial-patches.sh
└── update-doc-versions.sh
├── releasedocmaker
├── pom.xml
└── src
│ └── main
│ ├── assemblies
│ └── releasedocmaker.xml
│ ├── python
│ ├── releasedocmaker.py
│ └── releasedocmaker
│ │ ├── __init__.py
│ │ ├── getversions.py
│ │ ├── jira.py
│ │ └── utils.py
│ └── shell
│ └── releasedocmaker
├── shelldocs
├── pom.xml
└── src
│ └── main
│ └── python
│ └── shelldocs.py
├── start-build-env.sh
├── website-tester.sh
├── yetus-assemblies
├── pom.xml
└── src
│ └── main
│ └── resources
│ └── assemblies
│ ├── module-dist.xml
│ └── script-bundle.xml
├── yetus-dist
├── pom.xml
└── src
│ └── main
│ ├── assemblies
│ ├── bin-tgz.xml
│ ├── site-meta.xml
│ ├── site-tgz.xml
│ ├── site.xml
│ ├── source.xml
│ └── yetus-dist.xml
│ └── resources
│ └── VERSION
├── yetus-dl.sh
└── yetus-maven-plugin
├── pom.xml
└── src
└── main
├── java
└── org
│ └── apache
│ └── yetus
│ └── maven
│ └── plugin
│ └── fileops
│ ├── CreateDirsMojo.java
│ ├── CreateSymLinkMojo.java
│ ├── MakeBins4Libs.java
│ └── package-info.java
└── resources
└── licenses
└── ASL20.txt
/.asf.yaml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | ---
17 | github:
18 | enabled_merge_buttons:
19 | squash: true
20 | merge: false
21 | rebase: false
22 | notifications:
23 | commits: gitbox@yetus.apache.org
24 | issues: gitbox@yetus.apache.org
25 | pullrequests: gitbox@yetus.apache.org
26 | jira_options: link label worklog
27 |
--------------------------------------------------------------------------------
/.buildkite/pipeline.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | ---
16 | steps:
17 | - label: "Clean patch-dir"
18 | command: \[ -d /tmp/yetus-out ] && rm -rf /tmp/yetus-out/* || true
19 | - label: "Apache Yetus"
20 | command: >
21 | precommit/src/main/shell/test-patch.sh
22 | --brief-report-file=/tmp/yetus-out/brief.txt
23 | --bugcomments=briefreport,csvout,htmlout,buildkiteannotate
24 | --console-report-file=/tmp/yetus-out/console.txt
25 | --docker
26 | --docker-cache-from=ghcr.io/apache/yetus-base:main
27 | --csv-report-file=/tmp/yetus-out/report.csv
28 | --html-report-file=/tmp/yetus-out/report.html
29 | --java-home=/usr/lib/jvm/java-17-openjdk-amd64
30 | --patch-dir=/tmp/yetus-out
31 | --plugins=all
32 | --tests-filter=checkstyle,test4tests
33 | - label: 'Buildkite Recovery'
34 | command: >
35 | precommit/src/main/shell/buildkite-recovery.sh
36 | --patch-dir=/tmp/yetus-out
37 |
--------------------------------------------------------------------------------
/.cirrus.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | ---
17 |
18 | yetus_task:
19 | container:
20 | image: ghcr.io/apache/yetus:main
21 | test_script: >
22 | ${CIRRUS_WORKING_DIR}/precommit/src/main/shell/test-patch.sh
23 | --basedir="${CIRRUS_WORKING_DIR}"
24 | --brief-report-file=/tmp/yetus-out/brief.txt
25 | --bugcomments=briefreport,console,csvout,htmlout,junit
26 | --console-report-file=/tmp/yetus-out/console.txt
27 | --csv-report-file=/tmp/yetus-out/report.csv
28 | --html-report-file=/tmp/yetus-out/report.html
29 | --java-home=/usr/lib/jvm/java-11-openjdk-amd64
30 | --junit-report-xml=/tmp/yetus-out/junit.xml
31 | --plugins=all
32 | --junit-report-xml=line
33 | --tests-filter=checkstyle,test4tests
34 | always:
35 | junit_artifacts:
36 | path: "yetus-out/junit.xml"
37 | type: text/xml
38 | format: junit
39 | other_artifacts:
40 | path: "yetus-out/**"
41 |
--------------------------------------------------------------------------------
/.codespellignorelines:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | unless FileUtils.uptodate?(output, docs) &&
16 | FileUtils.uptodate?(output, [SHELLDOCS])
17 | -v /src/precommit/src/main/shell:/input:ro \
18 |
--------------------------------------------------------------------------------
/.codespellignorewords:
--------------------------------------------------------------------------------
1 | drob
2 | astroid
3 |
--------------------------------------------------------------------------------
/.codespellrc:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | [codespell]
17 | skip = *.css.*,*.js,./.git/*,./asf.yaml,./asf-site-src/Gemfile.lock
18 | ignore-words = .codespellignorewords
19 | exclude-file = .codespellignorelines
20 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | *.cs text diff=csharp
5 | *.java text diff=java
6 | *.html text diff=html
7 | *.py text diff=python
8 | *.pl text diff=perl
9 | *.pm text diff=perl
10 | *.css text
11 | *.js text
12 | *.sql text
13 |
14 | *.sh text eol=lf
15 |
16 | *.bat text eol=crlf
17 | *.cmd text eol=crlf
18 | *.vcxproj text merge=union eol=crlf
19 | *.csproj text merge=union eol=crlf
20 | *.sln text merge=union eol=crlf
21 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | ---
17 |
18 | version: 2
19 | updates:
20 | - package-ecosystem: "github-actions"
21 | # Workflow files stored in the
22 | # default location of `.github/workflows`
23 | directory: "/"
24 | schedule:
25 | interval: "weekly"
26 |
--------------------------------------------------------------------------------
/.github/workflows/action-test.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | ---
17 | name: Action Test
18 |
19 | on: [push, pull_request, workflow_dispatch] # yamllint disable-line rule:truthy
20 |
21 | jobs:
22 | build:
23 |
24 | runs-on: ubuntu-latest
25 |
26 | steps:
27 | - name: checkout
28 | uses: actions/checkout@v4
29 | with:
30 | path: src
31 | fetch-depth: 0
32 | - name: maven cache
33 | uses: actions/cache@v4
34 | with:
35 | path: ~/.m2
36 | key: yetus-m2-${{ hashFiles('**/pom.xml') }}
37 | - name: test-patch
38 | uses: apache/yetus-test-patch-action@main
39 | with:
40 | basedir: ./src
41 | javahome: /usr/lib/jvm/java-11-openjdk-amd64
42 | patchdir: ./out
43 | buildtool: maven
44 | githubtoken: ${{ secrets.GITHUB_TOKEN }}
45 | testsfilter: checkstyle,test4tests
46 | - name: Artifact output
47 | if: ${{ always() }}
48 | uses: actions/upload-artifact@v4
49 | with:
50 | name: apacheyetustestpatchactionout
51 | path: ${{ github.workspace }}/out
52 |
--------------------------------------------------------------------------------
/.github/workflows/ghcr.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | ---
17 | name: Github Container Registry
18 |
19 | on: # yamllint disable-line rule:truthy
20 | push:
21 | branches:
22 | - main
23 | tags:
24 | - rel/*
25 | schedule:
26 | - cron: '5 12 * * 6' # UTC
27 | workflow_dispatch:
28 |
29 | jobs:
30 | deploy:
31 | runs-on: ubuntu-22.04
32 | steps:
33 | - name: checkout
34 | uses: actions/checkout@v4
35 | with:
36 | path: src
37 | fetch-depth: 0
38 | - name: Set up QEMU
39 | id: qemu
40 | uses: docker/setup-qemu-action@v3
41 | with:
42 | image: tonistiigi/binfmt:qemu-v7.0.0-28
43 | platforms: all
44 | - name: Available platforms
45 | run: echo ${{ steps.qemu.outputs.platforms }}
46 | - name: Login to GitHub Container Registry
47 | uses: docker/login-action@v3
48 | with:
49 | registry: ghcr.io
50 | username: ${{ github.repository_owner }}
51 | password: ${{ secrets.GITHUB_TOKEN }}
52 | - name: Build and Push Docker Image
53 | env:
54 | DOCKER_REPO: ghcr.io/${{ github.repository }}
55 | DOCKER_MULTIARCH: "true"
56 | run: |
57 | cd src
58 | hooks/build
59 |
--------------------------------------------------------------------------------
/.github/workflows/linkcheck.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | ---
17 | name: linkcheck
18 |
19 | on: [push, pull_request, workflow_dispatch] # yamllint disable-line rule:truthy
20 |
21 |
22 | #
23 | # NOTE: these paths are referenced in start-build-env.sh
24 | #
25 |
26 | jobs:
27 | linkcheck:
28 | runs-on: ubuntu-latest
29 | steps:
30 | - name: checkout
31 | uses: actions/checkout@v4
32 | - name: maven cache
33 | uses: actions/cache@v4
34 | with:
35 | path: ~/.m2
36 | key: yetus-m2-${{ hashFiles('**/pom.xml') }}
37 | - name: test
38 | run: ./start-build-env.sh ./website-tester.sh
39 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | *.iml
3 | .flattened-pom.xml
4 | *.ipr
5 | *.iws
6 | *.orig
7 | *.rej
8 | **/.keep
9 | *.sdf
10 | *.suo
11 | *.vcxproj.user
12 | .idea
13 | .svn
14 | .classpath
15 | .project
16 | .settings
17 | target
18 | publish
19 | *.swp
20 | *.pyc
21 | asf-site-src/source/documentation/0*
22 | asf-site-src/source/documentation/in-progress/CHANGELOG.md
23 | asf-site-src/source/documentation/in-progress/RELEASENOTES.md
24 | asf-site-src/source/documentation/in-progress/precommit/apidocs
25 | linkchecker-out.csv
26 |
--------------------------------------------------------------------------------
/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | ---
17 |
18 | buretoolbox-job:
19 | image: ghcr.io/apache/yetus:main
20 | allow_failure: true
21 | script:
22 | - >
23 | precommit/src/main/shell/test-patch.sh
24 | --patch-dir=/tmp/yetus-out
25 | --plugins=all
26 | --java-home=/usr/lib/jvm/java-11-openjdk-amd64
27 | --html-report-file=/tmp/yetus-out/report.html
28 | --csv-report-file=/tmp/yetus-out/report.csv
29 | --console-report-file=/tmp/yetus-out/console.txt
30 | --brief-report-file=/tmp/yetus-out/brief.txt
31 | --bugcomments=briefreport,csvout,htmlout,gitlab,junit
32 | --tests-filter=checkstyle,test4tests
33 | --junit-report-xml=/tmp/yetus-out/junit-report.xml
34 |
35 | artifacts:
36 | expire_in: 1 week
37 | when: always
38 | paths:
39 | - yetus-out/
40 | reports:
41 | junit: yetus-out/junit-report.xml
42 |
--------------------------------------------------------------------------------
/.hadolint.yaml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | ---
16 | ignored:
17 | - DL3008
18 |
--------------------------------------------------------------------------------
/.jshintignore:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | asf-site-src/source/assets/js/bootstrap.js
16 | asf-site-src/source/assets/js/bootstrap.min.js
17 | asf-site-src/source/assets/js/jquery-2.1.4.min.js
18 |
--------------------------------------------------------------------------------
/.linkcheckerrc:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | [filtering]
17 | ignore=
18 | http://localhost:8123/documentation/[0-9]+.[0-9]+.[0-9]+
19 | resources/fonts/dejavu.css
20 | ignorewarnings=http-redirected
21 |
22 | [checking]
23 | norobots=1
24 |
25 | [output]
26 | fileoutput=csv
--------------------------------------------------------------------------------
/.markdownlint.yaml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | ---
17 | default: true
18 | line-length: false
19 | commands-show-output: false
20 | code-block-style: false
21 |
--------------------------------------------------------------------------------
/.mvn/maven.config:
--------------------------------------------------------------------------------
1 | -Drevision=0.16.0-SNAPSHOT
2 |
--------------------------------------------------------------------------------
/.rubocop.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | ---
16 | AllCops:
17 | NewCops: disable
18 | Layout/LineLength:
19 | Max: 100
20 | Metrics/MethodLength:
21 | Max: 30
22 | Style/HashEachMethods:
23 | Enabled: true
24 | Style/HashTransformKeys:
25 | Enabled: true
26 | Style/HashTransformValues:
27 | Enabled: true
28 |
--------------------------------------------------------------------------------
/.semaphore/semaphore-build.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one or more
4 | # contributor license agreements. See the NOTICE file distributed with
5 | # this work for additional information regarding copyright ownership.
6 | # The ASF licenses this file to You under the Apache License, Version 2.0
7 | # (the "License"); you may not use this file except in compliance with
8 | # the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 |
18 | PRECOMMITDIR=precommit/src/main/shell
19 |
20 | "${PRECOMMITDIR}/test-patch.sh" \
21 | --plugins=all \
22 | --bugcomments=briefreport,csvout,htmlout,junit \
23 | --mvn-custom-repos \
24 | --mvn-custom-repos-dir=/tmp/yetus-m2 \
25 | --patch-dir=/tmp/yetus-out \
26 | --tests-filter=checkstyle,test4tests \
27 | --csv-report-file=/tmp/yetus-out/report.csv \
28 | --junit-report-xml=/tmp/yetus-out/junit-results.xml \
29 | --junit-report-style=full \
30 | --docker \
31 | --dockerfile="${PRECOMMITDIR}/test-patch-docker/Dockerfile" \
32 | --docker-cache-from=ghcr.io/apache/yetus-base:main,ubuntu:jammy
33 |
--------------------------------------------------------------------------------
/.semaphore/semaphore.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | ---
17 |
18 | version: v1.0
19 | name: Apache Yetus
20 | agent:
21 | machine:
22 | type: e1-standard-2
23 | os_image: ubuntu2004
24 |
25 | blocks:
26 | - name: "Apache Yetus"
27 | task:
28 | jobs:
29 | - name: "Precommit"
30 | commands:
31 | - checkout
32 | - .semaphore/semaphore-build.sh
33 |
34 | epilogue:
35 | always:
36 | commands:
37 | - test-results publish /tmp/yetus-out/junit-results.xml
38 |
39 | after_pipeline:
40 | task:
41 | jobs:
42 | - name: Publish Results
43 | commands:
44 | - test-results gen-pipeline-report
45 |
--------------------------------------------------------------------------------
/.shellcheckrc:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | external-sources=true
17 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | ---
17 |
18 | sudo: required
19 |
20 | services:
21 | - docker
22 |
23 | addons:
24 | artifacts: true
25 | paths:
26 | - yetus-out
27 |
28 | script:
29 | - >
30 | precommit/src/main/shell/test-patch.sh
31 | --docker
32 | --patch-dir=/tmp/yetus-out
33 | --java-home=/usr/lib/jvm/java-11-openjdk-amd64
34 | --plugins=all,-detsecrets
35 | --docker-cache-from=ghcr.io/apache/yetus:main
36 | --html-report-file=/tmp/yetus-out/report.html
37 | --console-report-file=/tmp/yetus-out/console.txt
38 | --brief-report-file=/tmp/yetus-out/brief.txt
39 | --bugcomments=briefreport,htmlout
40 | --tests-filter=checkstyle,test4tests
41 |
--------------------------------------------------------------------------------
/.yetus/blanks-eol.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | precommit/src/test/resources/blanks.txt
17 | precommit/src/test/resources/arrayfiletest.txt
18 |
--------------------------------------------------------------------------------
/.yetus/blanks-tabs.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | precommit/src/test/resources/blanks.txt
17 |
--------------------------------------------------------------------------------
/.yetus/detsecrets-ignored-hashes.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | # this format is terrible but it is the one that detect-secret secrets uses so...
17 |
18 | c267b646441a206d44803d8cb20896c4a166cac2
19 | f4d95a7d14e9c4c69afe28d54743222acbe04b74
20 | 8774a670c8c160929c180ed3212ec3e828ed9412
21 | f17f2d6f8527bb25a0a1bb7e73f319eaae2a3d78
22 | 66defd532d6875b42111a786d7bf52bb8db61602
23 |
--------------------------------------------------------------------------------
/.yetus/excludes.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | precommit/src/test/resources/brokenfiles/1\.txt
17 | precommit/src/test/resources/brokenfiles/a.*\.txt
18 | precommit/src/test/resources/brokenfiles/[2-3]\.txt
19 | ^precommit/src/test/resources/brokenfiles/4\.txt
20 | precommit/src/test/resources/brokenfiles/perlcritic.pl
21 | .mvn/maven.config
22 |
--------------------------------------------------------------------------------
/.yetus/personality.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | personality_plugins "all"
18 |
19 | ## @description Globals specific to this personality
20 | ## @audience private
21 | ## @stability evolving
22 | function personality_globals
23 | {
24 | # shellcheck disable=SC2034
25 | BUILDTOOL=maven
26 | #shellcheck disable=SC2034
27 | PATCH_BRANCH_DEFAULT=main
28 | #shellcheck disable=SC2034
29 | JIRA_ISSUE_RE='^YETUS-[0-9]+$'
30 | #shellcheck disable=SC2034
31 | GITHUB_REPO_DEFAULT="apache/yetus"
32 | }
33 |
34 | ## @description Queue up modules for this personality
35 | ## @audience private
36 | ## @stability evolving
37 | ## @param repostatus
38 | ## @param testtype
39 | function personality_modules
40 | {
41 | declare repostatus=$1
42 | declare testtype=$2
43 |
44 | yetus_debug "Personality: ${repostatus} ${testtype}"
45 |
46 | clear_personality_queue
47 |
48 | case ${testtype} in
49 | mvninstall)
50 | if [[ "${repostatus}" = branch || "${BUILDMODE}" = full ]]; then
51 | clear_personality_queue
52 | personality_enqueue_module .
53 | return
54 | fi
55 | ;;
56 | *)
57 | ;;
58 | esac
59 |
60 | if declare -f "${BUILDTOOL}_builtin_personality_modules" >/dev/null; then
61 | "${BUILDTOOL}_builtin_personality_modules" "$@"
62 | fi
63 | }
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | ARG DOCKER_TAG=main
17 | ARG DOCKER_REPO=ghcr.io/apache/yetus
18 | FROM ${DOCKER_REPO}-base:${DOCKER_TAG}
19 |
20 | LABEL org.apache.yetus=""
21 | COPY . /ysrc/
22 | COPY entrypoint.sh /entrypoint.sh
23 | RUN chmod a+rx /entrypoint.sh
24 | ENTRYPOINT ["/entrypoint.sh"]
25 |
26 | # hadolint ignore=DL3003,DL3059
27 | RUN cd /ysrc \
28 | && mvn clean install -DskipTests \
29 | && rm -rf /.m2 \
30 | && cd /usr \
31 | && tar xzpf /ysrc/yetus-dist/target/artifacts/apache-yetus*bin.tar.gz \
32 | --strip 1 \
33 | && rm -rf /ysrc /root/.m2
34 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | Apache Yetus
2 | Copyright 2008-2022 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (https://www.apache.org/).
6 |
7 | ---
8 | Additional licenses for the Apache Yetus Source/Website:
9 | ---
10 |
11 |
12 | See LICENSE for terms.
13 |
--------------------------------------------------------------------------------
/asf-site-src/.dockerignore:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | README.md
17 | config.rb
18 | data
19 | pom.xml
20 | source
21 | src
22 | target
--------------------------------------------------------------------------------
/asf-site-src/Gemfile:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one or more
5 | # contributor license agreements. See the NOTICE file distributed with
6 | # this work for additional information regarding copyright ownership.
7 | # The ASF licenses this file to You under the Apache License, Version 2.0
8 | # (the "License"); you may not use this file except in compliance with
9 | # the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing, software
14 | # distributed under the License is distributed on an "AS IS" BASIS,
15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | # See the License for the specific language governing permissions and
17 | # limitations under the License.
18 |
19 | # rubocop:disable Style/HashSyntax, Style/SymbolArray
20 |
21 | # If you do not have OpenSSL installed, update
22 | # the following line to use 'http://' instead
23 | source 'https://rubygems.org'
24 |
25 | gem 'middleman', '~> 4.5'
26 |
27 | # Live-reloading plugin
28 | gem 'middleman-livereload'
29 |
30 | gem 'middleman-syntax', github: 'middleman/middleman-syntax'
31 |
32 | # For faster file watcher updates on Windows:
33 | gem 'wdm', '~> 0.1.0', :platforms => [:mswin, :mingw]
34 |
35 | # Windows does not come with time zone data
36 | gem 'tzinfo-data', platforms: [:mswin, :mingw, :jruby]
37 |
38 | gem 'mini_racer'
39 |
40 | gem 'kramdown-parser-gfm'
41 |
42 | gem 'haml', '~>5.2.2'
43 |
44 | # rubocop:enable Style/HashSyntax, Style/SymbolArray
45 |
--------------------------------------------------------------------------------
/asf-site-src/README.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Apache Yetus Website
21 |
22 | This is the website for Apache Yetus.
23 |
24 | See source/contribute.html.md for directions on how to update.
25 |
--------------------------------------------------------------------------------
/asf-site-src/data/htaccess.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | ---
16 | redirect:
17 | /latest.tgz: >
18 | https://www.apache.org/dyn/closer.cgi?action=download&filename=yetus/0.15.1/apache-yetus-0.15.1-bin.tar.gz
19 | /latest.tgz.asc: >
20 | https://downloads.apache.org/yetus/0.15.1/apache-yetus-0.15.1-bin.tar.gz.asc
21 |
--------------------------------------------------------------------------------
/asf-site-src/data/versions.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | ---
18 | releases:
19 | - '0.13.0'
20 | - '0.14.1'
21 | - '0.15.1'
22 |
--------------------------------------------------------------------------------
/asf-site-src/source/.htaccess.apache.erb:
--------------------------------------------------------------------------------
1 |
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 |
19 | <% data.htaccess.redirect.each do |old, new| %>
20 | Redirect 307 <%= old %> <%= new %>
21 | <% end %>
22 |
--------------------------------------------------------------------------------
/asf-site-src/source/_footer.html.erb:
--------------------------------------------------------------------------------
1 | <%#
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | %>
19 |
20 |
21 |
22 |
33 |
34 |
--------------------------------------------------------------------------------
/asf-site-src/source/assets/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/asf-site-src/source/assets/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/asf-site-src/source/assets/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/asf-site-src/source/assets/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/asf-site-src/source/assets/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/asf-site-src/source/assets/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/asf-site-src/source/assets/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/asf-site-src/source/assets/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/asf-site-src/source/assets/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/asf-site-src/source/assets/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/asf-site-src/source/assets/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/asf-site-src/source/assets/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/asf-site-src/source/assets/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/asf-site-src/source/assets/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/asf-site-src/source/assets/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/asf-site-src/source/assets/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/asf-site-src/source/assets/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/asf-site-src/source/assets/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/asf-site-src/source/assets/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/asf-site-src/source/assets/img/favicon.ico
--------------------------------------------------------------------------------
/asf-site-src/source/assets/img/yetus_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/asf-site-src/source/assets/img/yetus_logo.png
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/apidocs-index.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Precommit API Docs
21 |
22 | Following gives the downstream consumable API for precommit components.
23 |
24 | * [Core Functions](core/), common to both smart-apply-patch and test-patch.
25 | * [Smart Apply Patch](smart-apply-patch/) available to all plugins when running under smart-apply-patch.
26 | * [Test Patch](test-patch/), available to all plugins when running under test-patch.
27 | * [Precommit Plugins](plugins/) APIs available when they are also enabled.
28 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/github-status-recovery.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # GitHub Status Recovery
21 |
22 |
23 |
24 | * [Problem Statement](#problem-statement)
25 | * [Usage](#usage)
26 | * [Disabling Annotations](#disabling-annotations)
27 |
28 |
29 |
30 | # Problem Statement
31 |
32 | For CI systems that use GitHub outside of GitHub Actions, they may make available a GitHub Checks token.
33 | Unfortunately, as of this writing (2020-10-30), GitHub sets the expiry of such a token to 1 hour.
34 | For some users of Apache Yetus, their precommit job may take longer than one hour. In order to workaround
35 | this limitation, the `github-status-recovery` program may be used.
36 |
37 | # Usage
38 |
39 | The usage is relatively simple:
40 |
41 | ```bash
42 | $ github-status-recovery --patch-dir= --github-token=
43 | ```
44 |
45 | If the previous run of `test-patch` failed to write the status, `github-status-recovery` will
46 | re-process the saved JSON files as well as write GitHub Checks Annotations if they exist.
47 |
48 | # Disabling Annotations
49 |
50 | If for some reason you do not wish annotations to be written, they may be disabled with `--github-annotations=false`.
51 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/glossary.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Glossary
21 |
22 | ## Generic/outside definitions
23 |
24 | Apache's [new contributor documentation](https://community.apache.org/contributors/) and Maven's [glossary](https://maven.apache.org/glossary.html) are great places to start if you are new to Apache or Maven.
25 |
26 | * Module
27 |
28 | Almost the same meaning as "sub-project" on Maven.
29 |
30 | ## test-patch specific
31 |
32 | * Personality
33 |
34 | A chunk of shell code that tells test-patch this particular project's needs and special requirements
35 |
36 | * Plug-ins
37 |
38 | Shell code snippets that define new, not built-in test types.
39 |
40 | * Precommit
41 |
42 | An automated process that verifies a patch is "good" prior to a committer looking at it.
43 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/patchnames.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Patch File Naming
21 |
22 |
23 |
24 | * [JIRA](#jira)
25 | * [Github](#github)
26 |
27 |
28 |
29 | We use Apache Yetus to process your patch. It supports the following patterns and procedures for patch file names:
30 |
31 | ## JIRA
32 |
33 | If JIRA support is configured, attach the patch to the given ISSUE and
34 | click 'Submit Patch'. The patch file should be named one of:
35 |
36 | * ISSUE.patch
37 | * ISSUE.###.patch
38 | * ISSUE.branch.###.patch
39 | * ISSUE-branch-###.patch
40 | * ISSUE.###.branch.patch
41 | * ISSUE-branch.###.patch
42 |
43 | The meaning of the subpart are the following:
44 |
45 | * ISSUE: JIRA key (e.g. YETUS-1)
46 | * branch: either the name of a branch or a git hash prefixed with **git** (e.g. branch-2.8 or git8e55427b35)
47 | * ###: revision of the patch (e.g. 00 or 01)
48 |
49 | ## Github
50 |
51 | If Github support is also configured, a comment that contains a link to a Pull Request's patch file (e.g., ) will pull the patch from the given Github PR.
52 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/ansiblelint.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | ansiblelint
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | When [Ansible](https://www.ansible.com/) playbooks are detected (a file matching the pattern
31 | `playbooks/*.yml` or `playbooks/*.yaml`), runs
32 | [ansiblelint](https://ansible-lint.readthedocs.io) against those files.
33 |
34 | # Environment Variables
35 |
36 | None
37 |
38 | # Options
39 |
40 | | Option | Notes |
41 | |:---------|:------|
42 | | `--ansiblelint=` | Location of `ansible-lint` executable |
43 |
44 | # Docker Notes
45 |
46 | None
47 |
48 | # Developer Notes
49 |
50 | None
51 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/ant.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | ant
23 |
24 | # Category
25 |
26 | Build Tool
27 |
28 | # Description
29 |
30 | Provides support for the [Apache Ant](https://ant.apache.org) build tool.
31 |
32 | # Environment Variables
33 |
34 | | Variable | Passed to Docker | Notes |
35 | |:---------|:-----------------|:------|
36 | | `ANT_ARGS` | YES | Additional arguments to `ant` |
37 | | `ANT_HOME` | YES | Used to determine the location of the `ant` binary if it is not on the path or provided via the `--ant-cmd` flag |
38 | | `ANT_OPTS` | YES | Additional options to the JVM that runs `ant` |
39 |
40 | # Options
41 |
42 | | Option | Notes |
43 | |:---------|:------|
44 | | `--ant-cmd` | Specifically set the location of the `ant` binary |
45 |
46 | # Docker Notes
47 |
48 | * `${HOME}/.ivy2` is mounted to `/home/${USER_NAME}/.ivy2` in the container.
49 | * `ANT_OPTS` and `ANT_ARGS` are populated into the container environment.
50 |
51 | # Developer Notes
52 |
53 | See [build tools](../../buildtools) for more information.
54 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/asflicense.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | asflicense
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Runs the [Apache Creadur](http://creadur.apache.org) project's [Rat](http://creadur.apache.org/rat/) code to verify software licensing.
31 | Currently, `ant`, `gradle`, and `maven` have built-in support. The Apache Yetus container image also provides the jar file in /opt/apache-rat.
32 | For other build tools/scenarios, the rat jar will need to be provided.
33 |
34 | # Environment Variables
35 |
36 | None
37 |
38 | # Options
39 |
40 | | Option | Notes |
41 | |:---------|:------|
42 | | `--asflicense-rat-excludes=` | When running rat outside of a build tool, specify the location of the exclusion file |
43 | | `--asflicense-rat-globalexcludes=` | Apply the global excludes file after Apache Rat has run (default: true) |
44 | | `--asflicense-rat-jar=` | When running rat outside of a build tool, specify the location of the Java jar file to execute. Defaults to /opt/apache-rat/apache-rat.jar |
45 |
46 | # Docker Notes
47 |
48 | None
49 |
50 | # Developer Notes
51 |
52 | None
53 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/author.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | author
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Prevent `@``author` string from appearing the source tree. Many Java-based open source projects specifically prohibit this entry.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | None
39 |
40 | # Docker Notes
41 |
42 | None
43 |
44 | # Developer Notes
45 |
46 | None
47 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/autoconf.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | autoconf
23 |
24 | # Category
25 |
26 | Build Tool
27 |
28 | # Description
29 |
30 | Provides support for the [GNU Autoconf](https://www.gnu.org/software/autoconf/) environment. It currently does not support file systems with spaces in the path. It depends upon the `make` plug-in also being available.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | | Option | Notes |
39 | |:---------|:------|
40 | | `--autoconf-configure-flags=` | Set `./configure` flags |
41 |
42 | # Docker Notes
43 |
44 | None
45 |
46 | # Developer Notes
47 |
48 | See [build tools](../../buildtools) for more information.
49 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/blanks.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | blanks
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Provides a test to do two things:
31 |
32 | * Fail patches that use tabs instead of spaces (where appropriate)
33 | * End of line blank space
34 |
35 | By default, blanks will automatically ignore tabs in Makefiles and Go-related files. However, if a file is provided, that file must also include the appropriate regexs for Makefiles and Go.
36 |
37 | # Environment Variables
38 |
39 | None
40 |
41 | # Options
42 |
43 | | Option | Notes |
44 | |:---------|:------|
45 | | `--blanks-eol-ignore-file=` | File containing regexs of files/dirs to ignore EOL blanks. Defaults to `.yetus/blanks-eol.txt` |
46 | | `--blanks-tabs-ignore-file=` | File containing regexs of files/dirs to ignore tabs. Defaults to `.yetus/blanks-tabs.txt` |
47 |
48 | # Docker Notes
49 |
50 | None
51 |
52 | # Developer Notes
53 |
54 | None
55 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/briefreport.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | briefreport
23 |
24 | # Category
25 |
26 | Bug System
27 |
28 | # Description
29 |
30 | This plug-in provides a very no-nonsense, text-based report of a run.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | | Option | Notes |
39 | |:---------|:------|
40 | | `--brief-report-file=` | Name of the output file |
41 | | `--brief-report-long=` | Seconds to use to determine if a test should be considered long running |
42 |
43 | # Docker Notes
44 |
45 | None
46 |
47 | # Developer Notes
48 |
49 | None
50 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/buf.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | buf
23 | buflint
24 | bufcompat
25 |
26 | # Category
27 |
28 | Test
29 |
30 | # Description
31 |
32 | [buf](https://github.com/bufbuild/buf) is a protobuf linter (`buflint`) and backward compatibility checker (`bufcompat`), version 0.34.0 or higher.
33 | In order to use either `buflint` or `bufcompat`, `buf` must also be enabled.
34 |
35 | # Environment Variables
36 |
37 | None
38 |
39 | # Options
40 |
41 | | Option | Notes |
42 | |:---------|:------|
43 | | `--buf=` | path to `buf` executable if it is not on the path |
44 | | `--buf-basedir=` | set the starting dir to run buf |
45 | | `--buf-timeout=###u` | Set the buf timeout |
46 |
47 | # Docker Notes
48 |
49 | None
50 |
51 | # Developer Notes
52 |
53 | None
54 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/bugzilla.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | bugzilla
23 |
24 | # Category
25 |
26 | Bug System
27 |
28 | # Description
29 |
30 | Ability to read patch attachments from [Bugzilla](https://www.bugzilla.org/)-based systems.
31 |
32 | NOTE: It currently lacks the ability to write a response.
33 |
34 | # Environment Variables
35 |
36 | None
37 |
38 | # Options
39 |
40 | | Option | Notes |
41 | |:---------|:------|
42 | | `--bugzilla-base-url=` | URL of the Bugzilla instance. |
43 |
44 | # Docker Notes
45 |
46 | None
47 |
48 | # Developer Notes
49 |
50 | None
51 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/cc.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | cc
23 |
24 | # Category
25 |
26 | Compile
27 |
28 | # Description
29 |
30 | Gives the ability to interpret C/C++ compiler errors.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | None
39 |
40 | # Docker Notes
41 |
42 | None
43 |
44 | # Developer Notes
45 |
46 | None
47 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/checkmake.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | checkmake
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Runs [checkmake](https://github.com/mrtazz/checkmake) when the presence of a Makefile is found.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | | Option | Notes |
39 | |:---------|:------|
40 | | `--checkmake=` | Location of the `checkmake` binary if it is not on the path |
41 | | `--checkmake-config=` | Location of `checkmake`'s configuration file, if it is not in a default location |
42 |
43 | # Docker Notes
44 |
45 | None
46 |
47 | # Developer Notes
48 |
49 | None
50 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/checkstyle.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | checkstyle
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | [checkstyle](https://checkstyle.sourceforge.net/) is a style linter for Java and many Java-adjacent languages. This plugin requires
31 | support from the [Build Tool](../../buildtools) in order to work correctly. At present, support for `ant`, `maven`, and `gradle` are
32 | built-in.
33 |
34 | # Environment Variables
35 |
36 | None
37 |
38 | # Options
39 |
40 | | Option | Notes |
41 | |:---------|:------|
42 | | `--checkstyle-goal=` | Choose between `check` or `checkstyle` Maven goals. Defaults to `checkstyle`. |
43 |
44 | # Docker Notes
45 |
46 | None
47 |
48 | # Developer Notes
49 |
50 | None
51 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/cmake.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | cmake
23 |
24 | # Category
25 |
26 | Build Tool
27 |
28 | # Description
29 |
30 | Enables using [cmake](https://cmake.org/) as the build tool. This plug-in has a dependency on the `make` plug-in.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | | Option | Notes |
39 | |:---------|:------|
40 | | `--cmake-build-dir=` | Relative to each module, the location of the build directory to use for storing built output |
41 | | `--cmake-cmd=` | Location of `cmake`'s executable, if it is not on the path |
42 | | `--cmake-root-build=` | Enable/Disable module support if multiple CMakeLists.txt's are found |
43 |
44 | # Docker Notes
45 |
46 | None
47 |
48 | # Developer Notes
49 |
50 | There are two variables that personalities should probably set that correspond to two of the options above:
51 |
52 | | Variable | Option Equivalent |
53 | |:---------|:------|
54 | | CMAKE_BUILD_DIR | `--cmake-build-dir=` |
55 | | CMAKE_ROOT_BUILD | `--cmake-root-build=` |
56 |
57 | See [build tools](../../buildtools) for more information.
58 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/codespell.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | codespell
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Runs [codespell](https://github.com/codespell-project/codespell) on the repository.
31 |
32 | Due to how `codespell` executes, `./` is prefixed onto paths at runtime. This prefixing is
33 | to be a bit more consistent with how one would run it from the command line such
34 | that `.codespellrc` is easier to manage.
35 |
36 | # Environment Variables
37 |
38 | None
39 |
40 | # Options
41 |
42 | | Option | Notes |
43 | |:---------|:------|
44 | | `--codespell-exclude-lines=` | File of lines that codespell should ignore (defaults to `.codespellignorelines`) |
45 |
46 | # Docker Notes
47 |
48 | None
49 |
50 | # Developer Notes
51 |
52 | None
53 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/compile.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | compile
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Enable the compile cycle and any enabled Compile-type tests of precommit. This plug-in must be turned on in order to activate any other plug-ins that are of type Compile.
31 |
32 | # Requirements
33 |
34 | None
35 |
36 | # Environment Variables
37 |
38 | None
39 |
40 | # Options
41 |
42 | None
43 |
44 | # Docker Notes
45 |
46 | None
47 |
48 | # Developer Notes
49 |
50 | None
51 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/ctest.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | ctest
23 |
24 | # Category
25 |
26 | Test Format
27 |
28 | # Description
29 |
30 | Finds all `LastTestsFailed.log` files and processes them as though they were generated by [ctest](https://cmake.org/cmake/help/latest/manual/ctest.1.html).
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | None
39 |
40 | # Docker Notes
41 |
42 | None
43 |
44 | # Developer Notes
45 |
46 | None
47 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/detsecrets.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | detsecrets
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Runs [detect-secrets](https://github.com/yelp/detect-secrets).
31 |
32 | NOTE: This test also requires a working Python 3.4+ interpreter available on the path. It will be called first
33 | as `python3` and secondarily as `python`.
34 |
35 | # Environment Variables
36 |
37 | None
38 |
39 | # Options
40 |
41 | | Option | Notes |
42 | |:---------|:------|
43 | | `--detsecrets=` | Location of the `detect-secrets` binary if it is not on the path. Default is 'detect-secrets'. |
44 | | `--detsecrets-files=` | Regex of files to ignore. |
45 | | `--detsecrets-hashes-to-ignore=` | Filename of a list of hashes to ignore Default is .yetus/detsecrets-ignored-hashes.txt' |
46 | | `--detsecrets-lines=` | Regex of lines to ignore. |
47 | | `--detsecrets-secrets=` | Regex of secrets to ignore. |
48 |
49 | # Docker Notes
50 |
51 | The IBM version is based upon 0.13 and is slightly incompatible with the Yelp version. The docker container includes
52 | the Yelp version. Using the IBM version may result in some weirdness.
53 |
54 | # Developer Notes
55 |
56 | None
57 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/dupname.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | dupname
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Checks for file system objects in the git repository that conflict due to case. For example, if the source repository contains:
31 |
32 | ```git
33 | dir1/file
34 | DIR1/file
35 | dir1/File
36 | ```
37 |
38 | All three would be flagged as only one could exist on a case insensitive file system, such as Mac OS X's HFS+.
39 |
40 | NOTE: This test is ALWAYS enabled.
41 |
42 | # Environment Variables
43 |
44 | None
45 |
46 | # Options
47 |
48 | None
49 |
50 | # Docker Notes
51 |
52 | None
53 |
54 | # Developer Notes
55 |
56 | None
57 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/gitlab.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | gitlab
23 |
24 | # Category
25 |
26 | Bug System
27 |
28 | # Description
29 |
30 | Enables support for reading and writing back to [Gitlab](https://gitlab.com/) and compatible systems such as Gitlab Enterprise. See also the [Bugsystems](../../bugsystems) documentation for more information.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | | Option | Notes |
39 | |:---------|:------|
40 | | `--gitlab-disable-write` | Turn off writing to Gitlab merge requests |
41 | | `--gitlab-repo=` | `username/repository` identifier |
42 | | `--gitlab-token=` |OAuth 2.0 token to use for authentication |
43 | | `--gitlab-url=` | REST API URL (for Gitlab Enterprise) |
44 |
45 | # Docker Notes
46 |
47 | None
48 |
49 | # Developer Notes
50 |
51 | All of the command line settings may also be set via internal environment variables. However care must be taken to not step on [robots](../../robots) that will also set some of these variables.
52 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/golang.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | golang
23 |
24 | # Category
25 |
26 | Test (Compile)
27 |
28 | # Description
29 |
30 | NOTE: Go support is experimental.
31 |
32 | Provides support for [Go](https://golang.com) v1.12 and higher. This support includes the ability to read compiler errors as well as supplemental routines for other precommit tests that support Go directly such as [revive](../revive).
33 |
34 | Amongst other missing features, it does not support using Go as a [build tool](../../buildtools) or `go test` formatted output. Additionally, if Go source is detected, `precommit` will use `git checkout` in addition to `git clean` to maintain the source tree as part of the compile cycle.
35 |
36 | # Environment Variables
37 |
38 | None
39 |
40 | # Options
41 |
42 | | Option | Notes |
43 | |:---------|:------|
44 | | `--golang-go=` | Location of the `go` binary if it is not on the path |
45 |
46 | # Docker Notes
47 |
48 | The following standard Go compiler variables are passed onto the container environment:
49 |
50 | * CGO_LDFLAGS
51 | * CGO_ENABLED
52 | * GO111MODULE
53 | * GOPATH
54 |
55 | # Developer Notes
56 |
57 | None
58 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/golangcilint.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | golangcilint
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | NOTE: This plug-in only supports Go using Go modules.
31 |
32 | Provides support for
33 | [golangci-lint](https://github.com/golangci/golangci-lint). This
34 | plug-in requires the [golang](../golang) plug-in to also be enabled.
35 |
36 | # Environment Variables
37 |
38 | None
39 |
40 | # Options
41 |
42 | | Option | Notes |
43 | |:---------|:------|
44 | | `--golangcilint=` | Location of the `golangci-lint` binary if it is not on the path |
45 | | `--golangcilint-config=` | Override the default location of the configuration file |
46 |
47 | # Docker Notes
48 |
49 | None
50 |
51 | # Developer Notes
52 |
53 | None
54 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/gradle.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | gradle
23 |
24 | # Category
25 |
26 | Build Tool
27 |
28 | # Description
29 |
30 | Provides support for the [Gradle](https://www.gradle.org/) environment.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | | Option | Notes |
39 | |:---------|:------|
40 | | `--gradle-cmd=` | Set the location of the `gradle` command |
41 | | `--gradlew-cmd=` | Set the location of the `gradlew` command |
42 |
43 | # Docker Notes
44 |
45 | None
46 |
47 | # Developer Notes
48 |
49 | See [build tools](../../buildtools) for more information.
50 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/hadolint.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | hadolint
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Runs [hadolint](https://github.com/hadolint/hadolint) when the presence of a Dockerfile is found.
31 |
32 | * A locale with UTF-8 support is required. If the locale is not UTF-8 compliant, the locale will be forcibly set to C.UTF-8.
33 |
34 | # Environment Variables
35 |
36 | None
37 |
38 | # Options
39 |
40 | None
41 |
42 | # Docker Notes
43 |
44 | None
45 |
46 | # Developer Notes
47 |
48 | None
49 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/htmlout.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | htmlout
23 |
24 | # Category
25 |
26 | Bug System
27 |
28 | # Description
29 |
30 | This plug-in provides an HTML report snippet of the standard report for
31 | inclusion into a properly formatted HTML document. [Example output](htmlout-example.html)
32 |
33 | # Environment Variables
34 |
35 | None
36 |
37 | # Options
38 |
39 | | Option | Notes |
40 | |:---------|:------|
41 | | `--html-report-file=` | Name of the output file |
42 | | `--html-report-url=` | Override the default URL for using the HTML report |
43 |
44 | # Docker Notes
45 |
46 | None
47 |
48 | # Developer Notes
49 |
50 | None
51 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/javac.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | javac
23 |
24 | # Category
25 |
26 | Test (Compile)
27 |
28 | # Description
29 |
30 | Provides support for [Java](https://java.net) compilation.
31 |
32 | The location of Java must be configured either via the command line (--) or via the `JAVA_HOME` environment variable. On Mac OS X, `/usr/libexec/java_home` may also be used.
33 |
34 | The `JAVA_HOME`/`--java-home` JDK is considered the base JDK and will always be used last when `--multijdk` options are used. Therefore, it should **always** be the earliest version so that bytecode remains compatible between versions.
35 |
36 | # Environment Variables
37 |
38 | `JAVA_HOME` may be used to set the location of the JDK.
39 |
40 | # Options
41 |
42 | | Option | Notes |
43 | |:---------|:------|
44 | | `--java-home` | The base JDK to use for Java work |
45 | | `--multijdkdirs=` | Comma delimited list of directories to treat as JDKs |
46 | | `--multijdktests=` | Comma delimited list of tests that support MultiJDK mode that should actually be run in MultiJDK mode |
47 |
48 | # Docker Notes
49 |
50 | Locations should be local to the Docker container image.
51 |
52 | # Developer Notes
53 |
54 | * Options are actually handled by `test-patch` directly due to intertwined nature of them.
55 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/javadoc.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | javadoc
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Provides support for [Javadoc](https://java.net) testing.
31 |
32 | See the [javac](javac.html) plugin for more information.
33 |
34 | # Environment Variables
35 |
36 | See the [javac](javac.html) plugin for more information.
37 |
38 | # Options
39 |
40 | See the [javac](javac.html) plugin for more information.
41 |
42 | # Docker Notes
43 |
44 | See the [javac](javac.html) plugin for more information.
45 |
46 | # Developer Notes
47 |
48 | See the [javac](javac.html) plugin for more information.
49 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/jira.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | jira
23 |
24 | # Category
25 |
26 | Bug System
27 |
28 | # Description
29 |
30 | Enables support for reading and writing back to [JIRA](https://www.atlassian.com/software/jira), both on-premise and in-cloud. See also the [Bugsystems](../../bugsystems) documentation for more information.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | | Option | Notes |
39 | |:---------|:------|
40 | | `--jira-base-url=` | URL for the JIRA installation |
41 | | `--jira-issue-re=` | regular expression to use when trying to find a JIRA ref in the patch name |
42 | | `--jira-password=` | Password to use for authentication |
43 | | `--jira-status-re=` | Grep regular expression representing the issue status whose patch is applicable to the codebase |
44 | | `--jira-user=` | Username to use for authentication |
45 |
46 | # Docker Notes
47 |
48 | None
49 |
50 | # Developer Notes
51 |
52 | None
53 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/jshint.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | jshint
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Execute [jsint](https://jshint.com/) against JavaScript code.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | | Option | Notes |
39 | |:---------|:------|
40 | | `--jshint-cmd` | Executable location |
41 |
42 | # Docker Notes
43 |
44 | None
45 |
46 | # Developer Notes
47 |
48 | None
49 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/jsonlint.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | jsonlint
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | [jsonlint](https://github.com/zaach/jsonlint) lints JSON.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | | Option | Notes |
39 | |:---------|:------|
40 | | `--jsonlint=` | Location of the `jsonlint` binary if it is not on the path |
41 |
42 | # Docker Notes
43 |
44 | None
45 |
46 | # Developer Notes
47 |
48 | None
49 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/junit-bugsystem.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | junit
23 |
24 | # Category
25 |
26 | Bug System
27 |
28 | # Description
29 |
30 | The `junit` Bug System provides output of failed tests in [junit](https://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java) format.
31 |
32 | NOTE:
33 |
34 | * there is no formal specification of the format so results parsing the output may be mixed.
35 |
36 | # Environment Variables
37 |
38 | None
39 |
40 | # Options
41 |
42 | | Option | Notes |
43 | |:---------|:------|
44 | | `--junit-report-style=[full\|line]` | Style of the junit report |
45 | | `--junit-report-xml=` | Name of the output file |
46 |
47 | ## JUnit Style
48 |
49 | The JUnit report type has two formats:
50 |
51 | * `full` - summarizes per-test and provides a link to the report for that test
52 | * `line` - summarizes per-file and works better with integrated CI systems and with external readers such as Jenkins WarningNG plug-in
53 |
54 | # Docker Notes
55 |
56 | None
57 |
58 | # Developer Notes
59 |
60 | None
61 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/junit-testformat.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | junit
23 |
24 | # Category
25 |
26 | Test Format
27 |
28 | # Description
29 |
30 | The `junit` test format attempts to process test data as documented in [junit](https://svn.apache.org/repos/asf/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java) format.
31 |
32 | NOTE:
33 |
34 | * there is no formal specification of the format so results parsing the output may be mixed.
35 |
36 | # Environment Variables
37 |
38 | None
39 |
40 | # Options
41 |
42 | | Option | Notes |
43 | |:---------|:------|
44 | | `--junit-test-output=` | Directory to search for the test output TEST-*.xml files, relative to the module directory |
45 | | `--junit-test-prefix=` | Prefix to trim from test names to reduce the amount of output |
46 |
47 | # Docker Notes
48 |
49 | None
50 |
51 | # Developer Notes
52 |
53 | None
54 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/make.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | make
23 |
24 | # Category
25 |
26 | Build Tool
27 |
28 | # Description
29 |
30 | Enables using the various forms of make as the build tool. This includes [GNU make](https://www.gnu.org/software/make/) and [BSD make](https://www.freebsd.org/cgi/man.cgi?make(1)).
31 |
32 | Currently, this plugin makes assumptions about what are valid targets:
33 |
34 | | Target | Function |
35 | |:-------|:---------|
36 | | clean | Clean the directory, keeping any configuration objects such as from `autoconf`. (See also `--make-use-git-clean`) |
37 | | distclean | Clean the directory back to a pristine shape. (See also `--make-use-git-clean`) |
38 | | test | Perform unit testing |
39 |
40 | # Environment Variables
41 |
42 | None
43 |
44 | # Options
45 |
46 | | Option | Notes |
47 | |:---------|:------|
48 | | `--make-cmd=` | Executable location |
49 | | `--make-file=` | Filename to use instead of the default `Makefile` |
50 | | `--make-use-git-clean` | Instead of `make clean`, use `git clean` to wipe the repository |
51 |
52 | # Docker Notes
53 |
54 | None
55 |
56 | # Developer Notes
57 |
58 | See [build tools](../../buildtools) for more information.
59 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/markdownlint.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | markdownlint
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Runs [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) when the presence of Markdown files are found.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | None
39 |
40 | # Docker Notes
41 |
42 | None
43 |
44 | # Developer Notes
45 |
46 | None
47 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/maven.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | maven
23 |
24 | # Category
25 |
26 | Build Tool
27 |
28 | # Description
29 |
30 | Enables [Apache Maven](https://maven.apache.org) as the controlling build tool.
31 |
32 | # Environment Variables
33 |
34 | `MAVEN_HOME` may be used to find the `mvn` executable.
35 |
36 | # Options
37 |
38 | | Option | Notes |
39 | |:---------|:------|
40 | | `--mvn-cmd=` | Executable location |
41 | | `--mvn-custom-repos` | Use custom Apache Maven repositories (generally `$WORKSPACE/yetus-m2`) instead of the default. |
42 | | `--mvn-custom-repos-dir=` | Override the default location that test-patch will use when `--mvn-custom-repos` is enabled |
43 | | `--mvn-deps-order=` | Disable the plug-ins auto-dependency module ordering detection |
44 | | `--mvn-settings=` | Configuration the location of Maven\'s settings file |
45 |
46 | # Docker Notes
47 |
48 | None
49 |
50 | # Developer Notes
51 |
52 | The `maven` plug-in adds several API calls that other plug-ins may use to configure specific Apache Maven behavior, generally around Maven cache management.
53 |
54 | See [build tools](../../buildtools) for more information.
55 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/nobuild.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | nobuild
23 |
24 | # Category
25 |
26 | Build Tool
27 |
28 | # Description
29 |
30 | A stub build tool that does not do anything. Use this if you would like to enable static linting without getting Yetus to work with your project's build system.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | None
39 |
40 | # Docker Notes
41 |
42 | None
43 |
44 | # Developer Notes
45 |
46 | None
47 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/pathlen.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | pathlen
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Verifies that file paths in the source tree are less than a certain length. This check helps to guarantee that
31 | the repository will always work on limited file systems.
32 |
33 | # Environment Variables
34 |
35 | None
36 |
37 | # Options
38 |
39 | | Option | Notes |
40 | |:---------|:------|
41 | | `--pathlen-size=` | Set the acceptable size limit. Defaults to 240 characters |
42 |
43 | # Docker Notes
44 |
45 | None
46 |
47 | # Developer Notes
48 |
49 | None
50 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/perlcritic.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | perlcritic
23 |
24 | # Category
25 |
26 | One or more of:
27 |
28 | Test
29 |
30 | # Description
31 |
32 | Runs [perlcritic](http://perlcritic.com/) against Perl code.
33 |
34 | # Environment Variables
35 |
36 | None
37 |
38 | # Options
39 |
40 | | Option | Notes |
41 | |:---------|:------|
42 | | `--perlcritic=` | Location of the `perlcritic` binary if it is not on the path |
43 |
44 | # Docker Notes
45 |
46 | None
47 |
48 | # Developer Notes
49 |
50 | None
51 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/pylint.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | pylint
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Runs [pylint](http://pylint.org/) against Python code.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | | Option | Notes |
39 | |:---------|:------|
40 | | `--pylint=` | Location of the `pylint` binary if it is not on the path. Default is 'pylint'. |
41 | | `--pylint-ignore-bad-option-value=` | Ignore `bad-option-value` errors. Default is 'true' |
42 | | `--pylint-pip-cmd=` | Location of the `pip` binary for install requirements.txt files. Default is 'pip'. |
43 | | `--pylint-rcfile=` | Location of the `.pylintrc` file to override `pylint` default. |
44 | | `--pylint-requirements=` | Process any `requirements.txt` file. Default is 'false'. |
45 | | `--pylint-use-user=` | Use `--user` for processing the `requirements.txt` file. Default is 'true'. |
46 |
47 | # Docker Notes
48 |
49 | None
50 |
51 | # Developer Notes
52 |
53 | None
54 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/revive.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | revive
23 |
24 | # Category
25 |
26 | One or more of:
27 |
28 | Test
29 |
30 | # Description
31 |
32 | [revive](https://revive.run/) is an advanced Go linter. It acts as a drop-in replacement for `golint` but with more features and allows for exceptions.
33 |
34 | # Environment Variables
35 |
36 | None
37 |
38 | # Options
39 |
40 | | Option | Notes |
41 | |:---------|:------|
42 | | `--revive=` | Location of the `revive` binary if it is not on the path |
43 | | `--revive-config=` | Location of `revive`'s configuration file, if it is not in a default location |
44 |
45 | # Docker Notes
46 |
47 | None
48 |
49 | # Developer Notes
50 |
51 | None
52 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/rubocop.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | rubocop
23 |
24 | # Category
25 |
26 | One or more of:
27 |
28 | Test
29 |
30 | # Description
31 |
32 | Runs [rubocop](https://rubocop.org/) against Ruby code.
33 |
34 | # Environment Variables
35 |
36 | None
37 |
38 | # Options
39 |
40 | | Option | Notes |
41 | |:---------|:------|
42 | | `--rubocop=` | Location of the `rubocop` binary if it is not on the path |
43 | | `--rubocop-config=` | Relative path to rubocop config in source tree [default: none] |
44 |
45 | # Docker Notes
46 |
47 | None
48 |
49 | # Developer Notes
50 |
51 | None
52 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/scalac.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | scalac
23 |
24 | # Category
25 |
26 | Test (Compile)
27 |
28 | # Description
29 |
30 | Provides support for [Scala](https://scala-lang.org/) compilation.
31 |
32 | # Environment Variables
33 |
34 | See the [javac](javac.html) plugin for more information.
35 |
36 | # Options
37 |
38 | See the [javac](javac.html) plugin for more information.
39 |
40 | # Docker Notes
41 |
42 | See the [javac](javac.html) plugin for more information.
43 |
44 | # Developer Notes
45 |
46 | See the [javac](javac.html) plugin for more information.
47 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/scaladoc.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | scaladoc
23 |
24 | # Category
25 |
26 | Test (Compile)
27 |
28 | # Description
29 |
30 | Provides support for [Scaladoc](https://scala-lang.org/) documentation system.
31 |
32 | # Environment Variables
33 |
34 | See the [javac](javac.html) plugin for more information.
35 |
36 | # Options
37 |
38 | See the [javac](javac.html) plugin for more information.
39 |
40 | # Docker Notes
41 |
42 | See the [javac](javac.html) plugin for more information.
43 |
44 | # Developer Notes
45 |
46 | See the [javac](javac.html) plugin for more information.
47 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/shellcheck.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | shellcheck
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Runs [shellcheck](https://www.shellcheck.net) when the presence of a shell script is found.
31 |
32 | * A locale with UTF-8 support is required. If the locale is not UTF-8 compliant, the locale will be forcibly set to C.UTF-8.
33 | * The `-x` option is always passed to `shellcheck` if the version is greater than 0.4.1.
34 | * Versions of `shellcheck` that are earlier than 0.3.5 will generate a warning that the tool is very buggy.
35 |
36 | # Environment Variables
37 |
38 | None
39 |
40 | # Options
41 |
42 | None
43 |
44 | # Docker Notes
45 |
46 | None
47 |
48 | # Developer Notes
49 |
50 | None
51 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/slack.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | slack
23 |
24 | # Category
25 |
26 | Bug System
27 |
28 | # Description
29 |
30 | Send a notice to a [Slack](https://slack.com/) channel after executing.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | | Option | Notes |
39 | |:---------|:------|
40 | | `--slack-webhook-url=` | The URL of the Slack channel |
41 |
42 | # Docker Notes
43 |
44 | None
45 |
46 | # Developer Notes
47 |
48 | None
49 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/spotbugs.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | spotbugs
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Runs the Java-based [SpotBugs](https://spotbugs.github.io/) utility.
31 |
32 | # Environment Variables
33 |
34 | | Variable | Passed to Docker | Notes |
35 | |:---------|:-----------------|:------|
36 | | `SPOTBUGS_HOME` | NO | Used to determine the location of the SpotBugs installation |
37 |
38 | # Options
39 |
40 | | Option | Notes |
41 | |:---------|:------|
42 | | `--spotbugs-home==` | SpotBugs home directory. There is no default. |
43 | | `--spotbugs-strict-precheck` | Fail patch testing if `spotbugs` determines a failure before even applying the patch |
44 |
45 | # Docker Notes
46 |
47 | None
48 |
49 | # Developer Notes
50 |
51 | None
52 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/tap.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | tap
23 |
24 | # Category
25 |
26 | Test Format
27 |
28 | # Description
29 |
30 | The `tap` test format attempts to process test data generated in the [Test Anything Protocol](https://testanything.org/) format.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | | Option | Notes |
39 | |:---------|:------|
40 | | `--tap-log-dir==` | Directory to search for the test output *.tap files, relative to the module directory |
41 |
42 | # Docker Notes
43 |
44 | None
45 |
46 | # Developer Notes
47 |
48 | None
49 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/template.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | tool
23 |
24 | # Category
25 |
26 | One or more of:
27 |
28 | Build Tool
29 | Bug System
30 | Compile
31 | Test
32 | Test Format
33 |
34 | # Description
35 |
36 | Something cool
37 |
38 | # Environment Variables
39 |
40 | None
41 |
42 | # Options
43 |
44 | | Option | Notes |
45 | |:---------|:------|
46 | | `--checkmake=` | Location of the `checkmake` binary if it is not on the path |
47 | | `--checkmake-config=` | Location of `checkmake`'s configuration file, if it is not in a default location |
48 |
49 | # Docker Notes
50 |
51 | None
52 |
53 | # Developer Notes
54 |
55 | None
56 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/unitveto.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | unitveto
23 |
24 | # Category
25 |
26 | One or more of:
27 |
28 | Test
29 |
30 | # Description
31 |
32 | Automatically fail a patch if matching files are touched. This test is useful for code that absolutely requires human intervention.
33 |
34 | # Environment Variables
35 |
36 | | Variable | Passed to Docker | Notes |
37 | |:---------|:-----------------|:------|
38 | | `UNITVETO_RE` | NO | Same as `--unitveto-re` |
39 |
40 | # Options
41 |
42 | | Option | Notes |
43 | |:---------|:------|
44 | | `--unitveto-re=` | Regular expression of the files/directories to fail. |
45 |
46 | # Docker Notes
47 |
48 | None
49 |
50 | # Developer Notes
51 |
52 | None
53 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/xml.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | xml
23 |
24 | # Category
25 |
26 | One or more of:
27 |
28 | Test
29 |
30 | # Description
31 |
32 | Verify if HTML and XML files can be parsed. Requires `xmllint`.
33 |
34 | # Environment Variables
35 |
36 | None
37 |
38 | # Options
39 |
40 | None
41 |
42 | # Docker Notes
43 |
44 | None
45 |
46 | # Developer Notes
47 |
48 | None
49 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/plugins/yamllint.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Name
21 |
22 | yamllint
23 |
24 | # Category
25 |
26 | Test
27 |
28 | # Description
29 |
30 | Runs [yamllint](https://github.com/adrienverge/yamllint) against `.yml` or `.yaml` file extensions.
31 |
32 | # Environment Variables
33 |
34 | None
35 |
36 | # Options
37 |
38 | None
39 |
40 | # Docker Notes
41 |
42 | None
43 |
44 | # Developer Notes
45 |
46 | None
47 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/robots/azurepipelines.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Robots: Azure Pipelines
21 |
22 | NOTE: Azure Pipelines support is not stable and should be viewed as experimental, at best.
23 |
24 | TRIGGER: ${TF_BUILD}=True
25 |
26 | Azure Pipelines support has only been tested on the Ubuntu VM with GitHub as the source repository. It automatically configures `--patch-dir` to be `${BUILD_ARTIFACTSTAGINGDIRECTORY}/yetus`. While the URL to the console is provided in the report, links are not provided due to the URLs to artifacts not being available at runtime.
27 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/robots/buildkite.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Robots: Buildkite
21 |
22 | TRIGGER: ${BUILDKITE}=true
23 |
24 | The recommended configuration is to have Apache Yetus installed on the host running the build agent.
25 |
26 | If `buildkite-agent` is available and working, then artifacts will be automatically uploaded and an
27 | annotation added to the build console if `buildkiteannotate` bugsystem is enabled.
28 | If `${ARTIFACTS_PATH}` is configured, then `--patch-dir` is set to the first listed directory path
29 | with a `/yetus` suffix. However, links to the location logs must still be configured manually.
30 |
31 | # Buildkite Annotations
32 |
33 | If precommit is running in a mode such that `buildkite-agent` isn't available (e.g., using the Apache Yetus container image)
34 | the `buildkite-annotation-recovery` tool may be used to send the annotations and artifacts to Buildkite:
35 |
36 | The usage is simple:
37 |
38 | ```bash
39 | $ buildkite-recovery --patch-dir=
40 | ```
41 |
42 | See also:
43 |
44 | * Apache Yetus' source tree [.buildkite](https://github.com/apache/yetus/blob/main/.buildkite) for some tips and tricks.
45 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/robots/cirrusci.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Robots: Cirrus CI
21 |
22 | TRIGGER: ${CIRRUS_CI}=true
23 |
24 | `--patch-dir` will be configured to be `/tmp/yetus-out` and will be moved to the `yetus-out` directory in the source tree after completion. Adding this stanza to your `.cirrus.yml` file will upload and store those components for a week in Gitlab CI's artifact retrieval system:
25 |
26 | ```yaml
27 | ---
28 | always:
29 | junit_artifacts:
30 | path: "yetus-out/junit.xml"
31 | format: junit
32 | other_artifacts:
33 | path: "yetus-out/**"
34 | ```
35 |
36 | To use the `--patch-dir` for additional output, use the `/tmp/yetus-out` path. For example: `--html-report-file=/tmp/yetus-out/report.html`.
37 |
38 | To use the pre-built Apache Yetus Docker image from docker hub as the build environment, use the following snippet in the `.cirrus.yml` file, substituting the tag for the version of Apache Yetus that should be used and replacing the `JAVA_HOME` with the appropriate version as bundled mentioned in the Dockerfile:
39 |
40 | ```yaml
41 | ---
42 | yetus_task:
43 | container:
44 | image: apache/yetus:0.10.0
45 |
46 | ...
47 | ```
48 |
49 | See also:
50 |
51 | * Apache Yetus' source tree [.cirrus.yml](https://github.com/apache/yetus/blob/main/.cirrus.yml) for some tips and tricks.
52 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/robots/gitlabci.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Robots: Gitlab CI
21 |
22 | TRIGGER: ${GITLAB_CI}=true
23 |
24 | Artifacts, patch logs, etc are configured to go to a yetus-out directory in the source tree after completion. Adding this stanza to your `.gitlab-ci.yml` file will upload and store those components for a week in Gitlab CI's artifact retrieval system:
25 |
26 | ```yaml
27 | ---
28 | artifacts:
29 | expire_in: 1 week
30 | when: always
31 | paths:
32 | - yetus-out/
33 | ```
34 |
35 | To use the pre-built Apache Yetus Docker image from docker hub as the build environment, use the following snippet in the `.gitlab-ci.yml` file, substituting the tag for the version of Apache Yetus that should be used and replacing the `JAVA_HOME` with the appropriate version as bundled mentioned in the Dockerfile:
36 |
37 | ```yaml
38 | ---
39 | job:
40 | image: apache/yetus:0.9.0
41 | allow_failure: true
42 | variables:
43 | JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
44 |
45 | ...
46 | ```
47 |
48 | See also:
49 |
50 | * Apache Yetus' source tree [.gitlab-ci.yml](https://github.com/apache/yetus/blob/main/.gitlab-ci.yml) for some tips and tricks.
51 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/robots/semaphoreci.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Robots: Semaphore CI
21 |
22 | TRIGGER: ${CI}=true and ${SEMAPHORE}=true
23 |
24 | Semaphore CI requires that `checkout --use-cache` has been used prior to triggering test-patch. It is HIGHLY recommended to use a helper script checked into the repository to control precommit options to avoid problems with Semaphore CI's parsing of long lines in the YAML file.
25 |
26 | The GitHub repo and the Pull Request in use are automatically detected. However, some personalities may override the auto-detected Github repository information. It may be necessary to manually configure it in your `semaphore.yml` file.
27 |
28 | See also:
29 |
30 | * Apache Yetus' source tree [semaphore.yml](https://github.com/apache/yetus/blob/main/.semaphore/semaphore.yml) for some tips and tricks.
31 | * Apache Yetus' helper script [semaphore-build.sh](https://github.com/apache/yetus/blob/main/.semaphore/semaphore-build.sh)
32 |
--------------------------------------------------------------------------------
/asf-site-src/source/documentation/in-progress/precommit/robots/travisci.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # Robots: Travis CI
21 |
22 | TRIGGER: ${TRAVIS}=true
23 |
24 | Travis CI support will update the local checked out source repository to include references to all branches and tags
25 |
26 | If `${ARTIFACTS_PATH}` is configured, then `--patch-dir` is set to the first listed directory path. However, links to the location logs must still be configured manually.
27 |
28 | Personalities will override the auto-detected Github repository information. It may be necessary to manually configure it in your `.travis.yml` file.
29 |
30 | As of this writing, it is not possible to make the Travis CI build environment use the Apache Yetus pre-built docker
31 | images without using `docker run` in the before_install phase. Therefore, using the image is the same as described
32 | in the [Apache Yetus Docker Hub Images](../../../../../yetus-docker-image) page.
33 |
34 | NOTE: As of this writing (2020-10-31), Travis CI does not support Docker BuildKit. It is disabled by default.
35 | Also, docker build logs are automatically sent to a file due to the Travis CI logging limits.
36 |
37 | See also:
38 |
39 | * Apache Yetus' source tree [.travis.yml](https://github.com/apache/yetus/blob/main/.travis.yml) for some tips and tricks.
40 |
--------------------------------------------------------------------------------
/asf-site-src/source/downloads/.gitignore:
--------------------------------------------------------------------------------
1 | releasenotes
2 |
--------------------------------------------------------------------------------
/asf-site-src/source/index.html.md:
--------------------------------------------------------------------------------
1 |
19 |
20 |
21 |
22 |
23 |
Apache Yetus
24 |
25 |
... is a collection of libraries and tools that enable contribution and release processes for software projects.
26 |
27 |
28 |
29 |
30 | It provides:
31 |
32 | * a robust system for automatically checking new contributions against a variety of community accepted requirements
33 | * the means to document a well defined supported interface for downstream projects
34 | * tooling to help release managers generate release documentation based on the information provided by community issue trackers and source repositories
35 |
36 | Most of the software is written in shell and scripting languages. In honor of the shell code, the project takes its name
37 | *[Yetus](http://www.marinespecies.org/aphia.php?p=taxdetails&id=385438)* from a synonym of the *Cymbium* genus
38 | of [gastropods](https://en.wikipedia.org/wiki/Gastropoda).
39 |
--------------------------------------------------------------------------------
/asf-site-src/source/layouts/layout.html.erb:
--------------------------------------------------------------------------------
1 |
19 |
20 |
21 |
22 |
23 | Apache Yetus
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | <%= partial "header" %>
38 |
39 | <%= yield %>
40 |
41 | <%= partial "footer" %>
42 |
43 |
44 |
--------------------------------------------------------------------------------
/asf-site-src/src/main/assemblies/asf-site.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
23 | asf-site
24 |
25 | dir
26 |
27 | false
28 |
29 |
30 | ${project.build.directory}/site
31 | docs
32 |
33 | *
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/audience-annotations-component/audience-annotations/src/main/assemblies/audience-annotations.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
23 | audience-annotations
24 |
25 | dir
26 |
27 | false
28 |
29 |
30 | ${basedir}/target
31 | lib/audience-annotations
32 |
33 | audience-annotations**-${project.version}.jar
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | /**
20 | * Audience annotations.
21 | */
22 | package org.apache.yetus.audience;
--------------------------------------------------------------------------------
/audience-annotations-component/audience-annotations/src/main/java/org/apache/yetus/audience/tools/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | /**
20 | * Audience annotations.
21 | */
22 | package org.apache.yetus.audience.tools;
--------------------------------------------------------------------------------
/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Licensed to the Apache Software Foundation (ASF) under one or more
4 | # contributor license agreements. See the NOTICE file distributed with
5 | # this work for additional information regarding copyright ownership.
6 | # The ASF licenses this file to You under the Apache License, Version 2.0
7 | # (the "License"); you may not use this file except in compliance with
8 | # the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 |
18 | # if passed a flag, assume test-patch
19 | # otherwise assume bash
20 | if [[ "${1:0:1}" = '-' ]]; then
21 | set -- test-patch "$@"
22 | elif [[ -z "${1}" ]]; then
23 | set -- bash "$@"
24 | fi
25 | exec "$@"
26 |
--------------------------------------------------------------------------------
/hooks/push:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # push happens in build step now
18 |
19 | exit 0
20 |
--------------------------------------------------------------------------------
/precommit/src/main/python/unit-test-filter-file.example:
--------------------------------------------------------------------------------
1 | [package].[class].[method]
2 | ![package].[class].[method]
3 |
--------------------------------------------------------------------------------
/precommit/src/main/shell/coprocs.d/README:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | #############################
17 | ##
18 | ## bash v4+ coproc routines
19 | ##
20 | #############################
21 |
22 | # bash v3 and lower will treat coproc commands as syntax errors
23 | # therefore, ALL functions which activate coprocs are located
24 | # here
25 |
--------------------------------------------------------------------------------
/precommit/src/main/shell/coprocs.d/e_a_r_helper.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # SHELLDOC-IGNORE
18 |
19 | ## @description helper function for echo_and_redirect
20 | ## @audience private
21 | ## @stability evolving
22 | ## @replaceable no
23 | function e_a_r_helper
24 | {
25 | declare logfile=$1
26 | shift
27 | declare params=("${@}")
28 |
29 | echo "Launching yrr_coproc" >> "${COPROC_LOGFILE}"
30 | # shellcheck disable=SC2034
31 | coproc yrr_coproc {
32 | ulimit -Su "${PROC_LIMIT}"
33 | yetus_run_and_redirect "${logfile}" "${params[@]}"
34 | }
35 | }
--------------------------------------------------------------------------------
/precommit/src/main/shell/coprocs.d/process_counter.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # SHELLDOC-IGNORE
18 |
19 | function process_counter_coproc_start
20 | {
21 | if [[ "${OSTYPE}" = Linux && "${DOCKERMODE}" = true ]]; then
22 | # this is really only even remotely close to
23 | # accurate under Docker, for the time being.
24 |
25 | echo "Launching process_counter_coproc" >> "${COPROC_LOGFILE}"
26 | # shellcheck disable=SC2034
27 | coproc process_counter_coproc {
28 | declare threadcount
29 | declare maxthreadcount
30 | declare cmd
31 |
32 | sleep 2
33 | while true; do
34 | threadcount=$(ps -L -u "${USER_ID}" -o lwp 2>/dev/null | wc -l)
35 | if [[ ${threadcount} -gt ${maxthreadcount} ]]; then
36 | maxthreadcount="${threadcount}"
37 | echo "${maxthreadcount}" > "${PATCH_DIR}/threadcounter.txt"
38 | fi
39 | read -r -t 2 cmd
40 | case "${cmd}" in
41 | exit)
42 | exit 0
43 | ;;
44 | esac
45 | done
46 | }
47 | fi
48 | }
49 |
--------------------------------------------------------------------------------
/precommit/src/main/shell/coprocs.d/reaper.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # SHELLDOC-IGNORE
18 |
19 | function reaper_coproc_start
20 | {
21 | if [[ "${REAPER_MODE}" != "off" ]]; then
22 |
23 | echo "Launching reaper_coproc" >> "${COPROC_LOGFILE}"
24 |
25 | # shellcheck disable=SC2034
26 | coproc reaper_coproc {
27 | reaper_coproc_func
28 | }
29 | fi
30 | }
--------------------------------------------------------------------------------
/precommit/src/main/shell/plugins.d/nobuild.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # SHELLDOC-IGNORE
18 |
19 | # A simple build system that doesn't actually build anything
20 | # if you are building your own, this file acts as a great template!
21 |
22 | add_build_tool nobuild
23 |
24 | function nobuild_buildfile
25 | {
26 | echo
27 | }
28 |
29 | function nobuild_executor
30 | {
31 | echo "true"
32 | }
33 |
34 | function nobuild_modules_worker
35 | {
36 | declare status=$1
37 | declare testtype=$2
38 | modules_workers "${status}" "${testtype}"
39 | }
40 |
41 | function nobuild_builtin_personality_modules
42 | {
43 | declare status=$1
44 | declare testtype=$2
45 | yetus_debug "built-in personality for no build system: ${status} ${testtype}"
46 |
47 | clear_personality_queue
48 | for module in "${CHANGED_MODULES[@]}"; do
49 | personality_enqueue_module "${module}"
50 | done
51 | }
52 |
53 | function nobuild_builtin_personality_file_tests
54 | {
55 | declare filename=$1
56 |
57 | yetus_debug "Using built-in no build system personality_file_tests."
58 | yetus_debug " given file ${filename}"
59 | }
60 |
--------------------------------------------------------------------------------
/precommit/src/main/shell/plugins.d/unitveto.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # SHELLDOC-IGNORE
18 |
19 | add_test_type unitveto
20 |
21 | UNITVETO_RE=${UNITVETO_RE:-}
22 | UNITVETO_LOGFILE="results-unitveto.txt"
23 |
24 | function unitveto_filefilter
25 | {
26 | declare filename=$1
27 |
28 | if [[ -n "${UNITVETO_RE}"
29 | && ${filename} =~ ${UNITVETO_RE} ]]; then
30 | yetus_debug "unitveto: ${filename} matched"
31 | echo "${filename}:1:0:unitveto:matches ${UNITVETO_RE}" \
32 | >> "${PATCH_DIR}/${UNITVETO_LOGFILE}"
33 | add_test unitveto
34 | fi
35 | }
36 |
37 | function unitveto_usage
38 | {
39 | yetus_add_option "--unitveto-re=" "Regex to automatically -1 due to manual test requirements"
40 | }
41 |
42 | function unitveto_parse_args
43 | {
44 | declare i
45 |
46 | for i in "$@"; do
47 | case ${i} in
48 | --unitveto-re=*)
49 | delete_parameter "${i}"
50 | UNITVETO_RE=${i#*=}
51 | ;;
52 | esac
53 | done
54 | }
55 |
56 | function unitveto_patchfile
57 | {
58 | if ! verify_needed_test unit; then
59 | return 0
60 | fi
61 |
62 | if ! verify_needed_test unitveto; then
63 | return 0
64 | fi
65 |
66 | add_vote_table_v2 -1 unitveto "@@BASE@@/${UNITVETO_LOGFILE}" "Patch requires manual testing."
67 | bugsystem_linecomments_queue unitveto "${PATCH_DIR}/${UNITVETO_LOGFILE}"
68 | return 1
69 | }
70 |
--------------------------------------------------------------------------------
/precommit/src/main/shell/robots.d/gitlabci.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # no public APIs here
18 | # SHELLDOC-IGNORE
19 |
20 | # shellcheck disable=2034
21 | if [[ "${GITLAB_CI}" = true ]] &&
22 | declare -f compile_cycle >/dev/null; then
23 | CONSOLE_USE_BUILD_URL=true
24 | PATCH_DIR=/tmp/yetus-out
25 | RELOCATE_PATCH_DIR=true
26 | ROBOT=true
27 | ROBOTTYPE=gitlabci
28 | INSTANCE=${CI_JOB_ID}
29 | BUILD_URL=${CI_JOB_URL}
30 | BUILD_URL_CONSOLE="/"
31 | GITLAB_REPO=${CI_PROJECT_PATH}
32 | BUILD_URL_ARTIFACTS=/artifacts/file/yetus-out
33 | PATCH_OR_ISSUE="GLSHA:${CI_COMMIT_SHA}"
34 | USER_PARAMS+=("GLSHA:${CI_COMMIT_SHA}")
35 |
36 | add_docker_env \
37 | CI_COMMIT_SHA \
38 | CI_JOB_ID \
39 | CI_JOB_URL \
40 | CI_PROJECT_PATH \
41 | GITLAB_CI
42 |
43 | yetus_add_array_element EXEC_MODES Gitlab_CI
44 | yetus_add_array_element EXEC_MODES ResetRepo
45 | yetus_add_array_element EXEC_MODES Robot
46 | yetus_add_array_element EXEC_MODES UnitTests
47 | fi
48 |
49 | function gitlabci_set_plugin_defaults
50 | {
51 | # shellcheck disable=2034
52 | GITLAB_REPO=${CI_PROJECT_PATH}
53 | }
54 |
55 | function gitlabci_finalreport
56 | {
57 | add_footer_table "Console output" "${BUILD_URL}"
58 | }
59 |
60 | function gitlabci_artifact_url
61 | {
62 | echo "${BUILD_URL}${BUILD_URL_ARTIFACTS}"
63 | }
--------------------------------------------------------------------------------
/precommit/src/main/shell/test-patch-docker/Dockerfile.patchspecific:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | ARG baseimagename
18 | # hadolint ignore=DL3006
19 | FROM ${baseimagename}
20 |
21 | SHELL ["/bin/bash", "-o", "pipefail", "-c"]
22 |
23 | ARG USER_NAME
24 | ARG GROUP_ID
25 | ARG USER_ID
26 | ARG DOCKER_SOCKET_GID
27 | ARG DOCKER_WORK_DIR
28 |
29 | RUN groupadd --non-unique -g "${GROUP_ID}" "${USER_NAME}" || true
30 | # hadolint ignore=DL3059
31 | RUN useradd -l -g "${GROUP_ID}" -u "${USER_ID}" -m "${USER_NAME}" || true
32 |
33 | # docker socket handling. unless /etc/group is mounted, we have to do this.
34 | # hadolint ignore=DL3059
35 | RUN if [ "${DOCKER_SOCKET_GID}" != -1 ]; then (groupadd --non-unique --gid ${DOCKER_SOCKET_GID} dockersock && adduser "${USER_NAME}" dockersock ) || true; fi
36 |
37 | # hadolint ignore=DL3059
38 | RUN mkdir -p ${DOCKER_WORK_DIR}/extras \
39 | && chmod a+rwx ${DOCKER_WORK_DIR}/extras
40 | COPY user_params.txt ${DOCKER_WORK_DIR}/user_params.txt
41 | COPY launch-test-patch.sh /launch-test-patch.sh
42 | RUN chown -R "${USER_NAME}":"${GROUP_ID}" ${DOCKER_WORK_DIR} /launch-test-patch.sh || true
43 | # hadolint ignore=DL3059
44 | RUN chmod a+rx /launch-test-patch.sh
45 | # hadolint ignore=DL3059
46 | RUN chown -R "${USER_NAME}" "/home/${USER_NAME}" || true
47 | ENV HOME "/home/${USER_NAME}"
48 | USER ${USER_NAME}
49 | ENV DOCKER_WORK_DIR ${DOCKER_WORK_DIR}
50 | CMD ["/launch-test-patch.sh"]
--------------------------------------------------------------------------------
/precommit/src/test/resources/Makefile:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | .PHONY: all clean test
17 |
18 | all:
19 |
20 | clean:
21 |
22 | test:
23 |
--------------------------------------------------------------------------------
/precommit/src/test/resources/arrayfiletest.txt:
--------------------------------------------------------------------------------
1 | 1
2 | 2
3 |
4 | 3
5 |
6 | # Licensed to the Apache Software Foundation (ASF) under one or more
7 | # contributor license agreements. See the NOTICE file distributed with
8 | # this work for additional information regarding copyright ownership.
9 | # The ASF licenses this file to You under the Apache License, Version 2.0
10 | # (the "License"); you may not use this file except in compliance with
11 | # the License. You may obtain a copy of the License at
12 | #
13 | # http://www.apache.org/licenses/LICENSE-2.0
14 | #
15 | # Unless required by applicable law or agreed to in writing, software
16 | # distributed under the License is distributed on an "AS IS" BASIS,
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | # See the License for the specific language governing permissions and
19 | # limitations under the License.
20 |
--------------------------------------------------------------------------------
/precommit/src/test/resources/blanks.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | end of line
17 | tabs
18 |
19 |
--------------------------------------------------------------------------------
/precommit/src/test/resources/brokenfiles/1.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/precommit/src/test/resources/brokenfiles/1.txt
--------------------------------------------------------------------------------
/precommit/src/test/resources/brokenfiles/2.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/precommit/src/test/resources/brokenfiles/2.txt
--------------------------------------------------------------------------------
/precommit/src/test/resources/brokenfiles/3.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/precommit/src/test/resources/brokenfiles/3.txt
--------------------------------------------------------------------------------
/precommit/src/test/resources/brokenfiles/4.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/precommit/src/test/resources/brokenfiles/4.txt
--------------------------------------------------------------------------------
/precommit/src/test/resources/brokenfiles/a1.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/precommit/src/test/resources/brokenfiles/a1.txt
--------------------------------------------------------------------------------
/precommit/src/test/resources/brokenfiles/a2.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/precommit/src/test/resources/brokenfiles/a2.txt
--------------------------------------------------------------------------------
/precommit/src/test/resources/brokenfiles/a3.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/yetus/3d9b401fee39141a507a8f737656304bb23a1b7e/precommit/src/test/resources/brokenfiles/a3.txt
--------------------------------------------------------------------------------
/precommit/src/test/resources/brokenfiles/perlcritic.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env perl
2 |
3 | while (<>) {
4 | print $_
5 | }
--------------------------------------------------------------------------------
/precommit/src/test/resources/i18n/ß.json:
--------------------------------------------------------------------------------
1 | {
2 | "test1": "test1",
3 | "test2": "test2"
4 | }
5 |
--------------------------------------------------------------------------------
/precommit/src/test/resources/i18n/ä.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/precommit/src/test/resources/i18n/ç.yaml:
--------------------------------------------------------------------------------
1 | # test
2 | ---
3 |
4 | test:
5 | - 1
6 | - 2
7 |
--------------------------------------------------------------------------------
/precommit/src/test/shell/functions_test_helper.bash:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | setup() {
18 | RELTMP="${BATS_TEST_DIRNAME}/../../../target/test-dir/bats.$$.${RANDOM}"
19 | mkdir -p "${RELTMP}"
20 | TMP=$(cd -P -- "${RELTMP}" >/dev/null && pwd -P)
21 | export TMP
22 | TESTBINDIR=$(cd -P -- "$(pwd)" >/dev/null && pwd -P)
23 |
24 | echo "bindir: ${TESTBINDIR}" 2>&1
25 |
26 | tmpres="${BATS_TEST_DIRNAME}/../resources"
27 | # shellcheck disable=SC2034
28 | TESTRESOURCES=$(cd -P -- "${tmpres}" >/dev/null && pwd -P)
29 |
30 | mkdir -p "${TMP}"
31 |
32 | # shellcheck disable=SC2034
33 | QATESTMODE=true
34 |
35 | # shellcheck disable=SC1090
36 | . "${BATS_TEST_DIRNAME}/../../main/shell/core.d/00-yetuslib.sh"
37 | # shellcheck disable=SC1090
38 | . "${BATS_TEST_DIRNAME}/../../main/shell/core.d/01-common.sh"
39 | pushd "${TMP}" >/dev/null || return 1
40 | }
41 |
42 | teardown() {
43 | popd >/dev/null || return 1
44 | rm -rf "${TMP}"
45 | }
46 |
47 | strstr() {
48 | if [ "${1#*$2}" != "${1}" ]; then
49 | echo true
50 | else
51 | echo false
52 | fi
53 | }
54 |
--------------------------------------------------------------------------------
/precommit/src/test/shell/run-bats.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | targetdir=../../../target
18 | mkdir -p "${targetdir}/surefire-reports" "${targetdir}/tap"
19 |
20 | batsexe=$(command -v bats) 2>/dev/null
21 |
22 | if [[ -z ${batsexe} ]]; then
23 | echo "not ok - no bats executable found" > "${targetdir}/tap/shelltest.tap"
24 | echo ""
25 | echo ""
26 | echo "ERROR: bats not installed. Skipping bash tests."
27 | echo "ERROR: Please install bats as soon as possible."
28 | echo ""
29 | echo ""
30 | exit 0
31 | fi
32 |
33 | for j in *.bats; do
34 | echo Running bats -t "${j}"
35 | bats -t "${j}" 2>&1 | tee "${targetdir}/tap/${j}.tap"
36 | result=${PIPESTATUS[0]}
37 | ((exitcode=exitcode+result))
38 | done
39 |
40 | if [[ ${exitcode} -gt 0 ]]; then
41 | exit 1
42 | fi
43 | exit 0
44 |
--------------------------------------------------------------------------------
/precommit/src/test/shell/yetus_abs.bats:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | load functions_test_helper
18 |
19 | create_fake () {
20 | mkdir "${TMP}/j"
21 | touch "${TMP}/j/k"
22 | ln -s j "${TMP}/l"
23 | }
24 |
25 |
26 | @test "yetus_abs (simple not exist)" {
27 | run yetus_abs fake
28 | [ "${status}" -eq 1 ]
29 | }
30 |
31 | @test "yetus_abs (simple dir)" {
32 | create_fake
33 | run yetus_abs "${TMP}/j"
34 | [ "${output}" = "${TMP}/j" ]
35 | }
36 |
37 | @test "yetus_abs (simple file)" {
38 | create_fake
39 | run yetus_abs "${TMP}/j/k"
40 | [ "${output}" = "${TMP}/j/k" ]
41 | }
42 |
43 | @test "yetus_abs (relative file1)" {
44 | create_fake
45 | run yetus_abs "${TMP}/j/../j/k"
46 | [ "${output}" = "${TMP}/j/k" ]
47 | }
48 |
49 | @test "yetus_abs (relative file2)" {
50 | create_fake
51 | run yetus_abs "${RELTMP}/j/../j/k"
52 | [ "${output}" = "${TMP}/j/k" ]
53 | }
54 |
55 | @test "yetus_abs (relative dir)" {
56 | create_fake
57 | fred=$(cd -P -- ".." >/dev/null && pwd -P)
58 | run yetus_abs ".."
59 | [ "${output}" = "${fred}" ]
60 | }
61 |
62 | @test "yetus_abs (symlink)" {
63 | create_fake
64 | run yetus_abs "${TMP}/l"
65 | [ "${output}" = "${TMP}/j" ]
66 | }
67 |
--------------------------------------------------------------------------------
/precommit/src/test/shell/yetus_add_array_element.bats:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | load functions_test_helper
18 |
19 | @test "yetus_add_array_element (empty)" {
20 | yetus_add_array_element ARRAY value
21 | [ "${ARRAY[0]}" = value ]
22 | }
23 |
24 | @test "yetus_add_array_element (exist)" {
25 | ARRAY=("val2")
26 | yetus_add_array_element ARRAY val1
27 | [ "${ARRAY[0]}" = val2 ]
28 | [ "${ARRAY[1]}" = val1 ]
29 | }
30 |
31 | @test "yetus_add_array_element (double exist)" {
32 | ARRAY=("val2" "val1")
33 | yetus_add_array_element ARRAY val3
34 | [ "${ARRAY[0]}" = val2 ]
35 | [ "${ARRAY[1]}" = val1 ]
36 | [ "${ARRAY[2]}" = val3 ]
37 | }
38 |
--------------------------------------------------------------------------------
/precommit/src/test/shell/yetus_array_contains.bats:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | load functions_test_helper
18 |
19 | @test "yetus_array_contains (empty)" {
20 | run yetus_array_contains value "${ARRAY[@]}"
21 | [ "${status}" = 1 ]
22 | }
23 |
24 | @test "yetus_array_contains (exist)" {
25 | ARRAY=("value")
26 | run yetus_array_contains value "${ARRAY[@]}"
27 | [ "${status}" = 0 ]
28 | }
29 |
30 | @test "yetus_array_contains (notexist)" {
31 | ARRAY=("different")
32 | run yetus_array_contains value "${ARRAY[@]}"
33 | [ "${status}" = 1 ]
34 | }
35 |
36 | @test "yetus_array_contains (exist, multi)" {
37 | ARRAY=("val1" "val2" "val3")
38 | for j in val1 val2 val3; do
39 | run yetus_array_contains "${j}" "${ARRAY[@]}"
40 | [ "${status}" = 0 ]
41 | done
42 | }
43 |
44 | @test "yetus_array_contains (multi, not exist)" {
45 | ARRAY=("val1" "val2" "val3")
46 | run yetus_array_contains value "${ARRAY[@]}"
47 | [ "${status}" = 1 ]
48 | }
49 |
--------------------------------------------------------------------------------
/precommit/src/test/shell/yetus_array_to_comma.bats:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | load functions_test_helper
18 |
19 | @test "yetus_array_to_comma (empty)" {
20 | # shellcheck disable=SC2034
21 | ARRAY=()
22 | run yetus_array_to_comma ARRAY
23 | [ "${output}" = "" ]
24 | }
25 |
26 | @test "yetus_array_to_comma (one)" {
27 | # shellcheck disable=SC2034
28 | ARRAY=(one)
29 | run yetus_array_to_comma ARRAY
30 | [ "${output}" = "one" ]
31 | }
32 |
33 | @test "yetus_array_to_comma (two)" {
34 | # shellcheck disable=SC2034
35 | ARRAY=(one two)
36 | run yetus_array_to_comma ARRAY
37 | [ "${output}" = "one,two" ]
38 | }
39 |
40 | @test "yetus_array_to_comma (three)" {
41 | # shellcheck disable=SC2034
42 | ARRAY=(one two three)
43 | run yetus_array_to_comma ARRAY
44 | [ "${output}" = "one,two,three" ]
45 | }
--------------------------------------------------------------------------------
/precommit/src/test/shell/yetus_del_array_element.bats:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | load functions_test_helper
18 |
19 | @test "yetus_del_array_element (empty array)" {
20 | yetus_del_array_element ARRAY value
21 | [ "${#ARRAY[@]}" -eq 0 ]
22 | }
23 |
24 | @test "yetus_del_array_element (not exist)" {
25 | ARRAY=("val2")
26 | yetus_del_array_element ARRAY val1
27 | [ "${ARRAY[0]}" = val2 ]
28 | [ "${#ARRAY[@]}" -eq 1 ]
29 | }
30 |
31 | @test "yetus_add_array_element (single exist)" {
32 | ARRAY=("val1")
33 | yetus_del_array_element ARRAY val1
34 | echo ">${ARRAY[*]}<"
35 | [ "${#ARRAY[@]}" -eq 0 ]
36 | }
37 |
38 | @test "yetus_del_array_element (size 2, exist)" {
39 | ARRAY=("val2" "val1")
40 | yetus_del_array_element ARRAY val1
41 | [ "${ARRAY[0]}" = val2 ]
42 | [ "${ARRAY[1]}" = '' ]
43 | [ "${#ARRAY[@]}" -eq 1 ]
44 | }
45 |
46 | @test "yetus_del_array_element (size 2, exist, squash)" {
47 | ARRAY=("val2" "val1")
48 | yetus_del_array_element ARRAY val2
49 | [ "${ARRAY[0]}" = val1 ]
50 | [ "${ARRAY[1]}" = '' ]
51 | [ "${#ARRAY[@]}" -eq 1 ]
52 | }
53 |
54 | @test "yetus_del_array_element (size 3, exist, squash)" {
55 | ARRAY=("val3" "val2" "val1")
56 | yetus_del_array_element ARRAY val2
57 | [ "${ARRAY[0]}" = val3 ]
58 | [ "${ARRAY[1]}" = val1 ]
59 | [ "${#ARRAY[@]}" -eq 2 ]
60 | }
--------------------------------------------------------------------------------
/precommit/src/test/shell/yetus_file_to_array.bats:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | load functions_test_helper
18 |
19 | @test "yetus_file_to_array (empty)" {
20 | run yetus_file_to_array ARRAY "nonexistent"
21 | [ "${status}" = 1 ]
22 | }
23 |
24 | @test "yetus_file_to_array (basic read)" {
25 | run yetus_file_to_array ARRAY "${TESTRESOURCES}/arrayfiletest.txt"
26 | [ "${status}" = 0 ]
27 | }
28 |
29 | @test "yetus_file_to_array (contents)" {
30 | yetus_file_to_array ARRAY "${TESTRESOURCES}/arrayfiletest.txt"
31 | [ "${ARRAY[0]}" = 1 ]
32 | }
33 |
34 | @test "yetus_file_to_array (count)" {
35 | yetus_file_to_array ARRAY "${TESTRESOURCES}/arrayfiletest.txt"
36 | [ "${#ARRAY[@]}" -eq 3 ]
37 | }
--------------------------------------------------------------------------------
/precommit/src/test/shell/yetus_sort_and_unique_array.bats:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | load functions_test_helper
18 |
19 | @test "yetus_sort_and_unique_array (empty)" {
20 | yetus_sort_and_unique_array ARRAY
21 | }
22 |
23 | @test "yetus_sort_and_unique_array (single value)" {
24 | ARRAY=("value")
25 | yetus_sort_and_unique_array ARRAY
26 | }
27 |
28 | @test "yetus_sort_and_unique_array (multiple value)" {
29 | ARRAY=("b" "c" "a")
30 | preifsod=$(echo "${IFS}" | od -c)
31 | yetus_sort_and_unique_array ARRAY
32 | postifsod=$(echo "${IFS}" | od -c)
33 |
34 | [ "${ARRAY[0]}" = "a" ]
35 | [ "${ARRAY[1]}" = "b" ]
36 | [ "${ARRAY[2]}" = "c" ]
37 | [ "${preifsod}" = "${postifsod}" ]
38 | }
39 |
40 | @test "yetus_sort_and_unique_array (multiple duplicate values)" {
41 | ARRAY=("b" "c" "b" "a" "a" "c")
42 | preifsod=$(echo "${IFS}" | od -c)
43 | yetus_sort_and_unique_array ARRAY
44 | postifsod=$(echo "${IFS}" | od -c)
45 |
46 | [ "${ARRAY[0]}" = "a" ]
47 | [ "${ARRAY[1]}" = "b" ]
48 | [ "${ARRAY[2]}" = "c" ]
49 | [ "${preifsod}" = "${postifsod}" ]
50 | }
--------------------------------------------------------------------------------
/precommit/src/test/shell/yetus_sort_array.bats:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | load functions_test_helper
18 |
19 | @test "yetus_sort_array (empty)" {
20 | yetus_sort_array ARRAY
21 | }
22 |
23 | @test "yetus_sort_array (single value)" {
24 | ARRAY=("value")
25 | yetus_sort_array ARRAY
26 | }
27 |
28 | @test "yetus_sort_array (multiple value)" {
29 | ARRAY=("b" "c" "a")
30 | preifsod=$(echo "${IFS}" | od -c)
31 | yetus_sort_array ARRAY
32 | postifsod=$(echo "${IFS}" | od -c)
33 |
34 | [ "${ARRAY[0]}" = "a" ]
35 | [ "${ARRAY[1]}" = "b" ]
36 | [ "${ARRAY[2]}" = "c" ]
37 | [ "${preifsod}" = "${postifsod}" ]
38 | }
39 |
40 | @test "yetus_sort_array (multiple duplicate values)" {
41 | ARRAY=("b" "c" "b" "a" "a" "c")
42 | preifsod=$(echo "${IFS}" | od -c)
43 | yetus_sort_array ARRAY
44 | postifsod=$(echo "${IFS}" | od -c)
45 |
46 | [ "${ARRAY[0]}" = "a" ]
47 | [ "${ARRAY[1]}" = "a" ]
48 | [ "${ARRAY[2]}" = "b" ]
49 | [ "${ARRAY[3]}" = "b" ]
50 | [ "${ARRAY[4]}" = "c" ]
51 | [ "${ARRAY[5]}" = "c" ]
52 |
53 | [ "${preifsod}" = "${postifsod}" ]
54 | }
--------------------------------------------------------------------------------
/precommit/src/test/shell/yetus_trim.bats:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | load functions_test_helper
18 |
19 | @test "yetus_trim (no trim)" {
20 | run yetus_trim fake
21 | [ "${output}" = "fake" ]
22 | }
23 |
24 | @test "yetus_trim (left trim)" {
25 | run yetus_trim " fake"
26 | [ "${output}" = "fake" ]
27 | }
28 |
29 | @test "yetus_trim (right trim)" {
30 | run yetus_trim "fake "
31 | [ "${output}" = "fake" ]
32 | }
33 |
34 | @test "yetus_trim (dual trim)" {
35 | run yetus_trim " fake "
36 | [ "${output}" = "fake" ]
37 | }
38 |
--------------------------------------------------------------------------------
/releasedocmaker/src/main/assemblies/releasedocmaker.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
23 | releasedocmaker
24 |
25 | dir
26 |
27 | false
28 |
29 |
30 | ${basedir}/src/main/python
31 | lib/releasedocmaker
32 |
33 | **
34 |
35 | 0755
36 |
37 |
38 | ${basedir}/src/main/shell
39 | bin
40 |
41 | *
42 |
43 | 0755
44 |
45 |
46 |
--------------------------------------------------------------------------------
/releasedocmaker/src/main/python/releasedocmaker.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing, software
14 | # distributed under the License is distributed on an "AS IS" BASIS,
15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | # See the License for the specific language governing permissions and
17 | # limitations under the License.
18 | """ wrapper to launch releasedocmaker from the CLI """
19 |
20 | import sys
21 |
22 | sys.dont_write_bytecode = True
23 | # pylint: disable=wrong-import-position,import-self
24 | import releasedocmaker
25 | #pylint: disable=no-member
26 | releasedocmaker.main()
27 |
--------------------------------------------------------------------------------
/releasedocmaker/src/main/shell/releasedocmaker:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 |
18 | # Make a special version of the shell wrapper for releasedocmaker
19 | # that maintains the ability to have '--lint' mean '--lint=all'
20 |
21 | args=()
22 | for arg in "${@}"; do
23 | if [ "${arg}" = "-n" ] || [ "${arg}" = "--lint" ]; then
24 | args=("${args[@]}" "--lint=all")
25 | else
26 | args=("${args[@]}" "${arg}")
27 | fi
28 | done
29 |
30 | exec "$(dirname -- "${BASH_SOURCE-0}")/../lib/releasedocmaker/releasedocmaker.py" "${args[@]}"
31 |
--------------------------------------------------------------------------------
/yetus-assemblies/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
24 | 4.0.0
25 |
26 | org.apache.yetus
27 | yetus-project
28 | ${revision}
29 | ..
30 |
31 | yetus-assemblies
32 | Common Assemblies Creation
33 | Apache Yetus - Assemblies
34 | jar
35 |
36 |
37 |
38 |
39 | maven-deploy-plugin
40 |
41 | true
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/yetus-assemblies/src/main/resources/assemblies/module-dist.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
23 | module-dist
24 |
25 | tar.gz
26 |
27 | false
28 |
29 |
30 | ${project.build.directory}/dist/apache-yetus-${project.version}
31 | apache-yetus-${project.version}
32 |
33 | **
34 |
35 | 0755
36 |
37 |
38 |
--------------------------------------------------------------------------------
/yetus-assemblies/src/main/resources/assemblies/script-bundle.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
23 | script-bundle
24 |
25 | dir
26 |
27 | false
28 |
29 |
30 | ${basedir}/src/main/shell
31 | lib/${project.artifactId}
32 |
33 | **
34 |
35 | 0755
36 |
37 |
38 | ${basedir}/src/main/python
39 | lib/${project.artifactId}
40 |
41 | **
42 |
43 | 0755
44 |
45 |
46 |
--------------------------------------------------------------------------------
/yetus-dist/src/main/assemblies/bin-tgz.xml:
--------------------------------------------------------------------------------
1 |
17 |
20 | yetus-bin-tgz
21 |
22 | tar.gz
23 |
24 | false
25 |
26 |
27 | ${project.build.directory}/apache-yetus-${project.version}
28 | apache-yetus-${project.version}
29 |
30 | **
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/yetus-dist/src/main/assemblies/site-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
23 | site-meta-pkg
24 |
25 | dir
26 |
27 | false
28 |
29 |
30 | ../asf-site-src/source/documentation/in-progress/
31 | .
32 |
33 | CHANGELOG.md
34 | RELEASENOTES.md
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/yetus-dist/src/main/assemblies/site-tgz.xml:
--------------------------------------------------------------------------------
1 |
17 |
20 | yetus-site-tgz
21 |
22 | tar.gz
23 |
24 | false
25 |
26 |
27 | ${project.build.directory}/apache-yetus-${project.version}-site
28 | apache-yetus-${project.version}-site
29 |
30 | **
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/yetus-dist/src/main/assemblies/source.xml:
--------------------------------------------------------------------------------
1 |
17 |
20 | yetus-src
21 |
22 | tar.gz
23 |
24 | true
25 |
26 |
27 | ..
28 | true
29 |
30 | .git/**
31 | **/.gitignore
32 | **/.svn
33 | **/*.iws
34 | **/*.ipr
35 | **/*.iml
36 | **/.classpath
37 | **/.project
38 | **/.settings
39 | **/target/**
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/yetus-dist/src/main/resources/VERSION:
--------------------------------------------------------------------------------
1 | ${project.version}
--------------------------------------------------------------------------------
/yetus-maven-plugin/src/main/java/org/apache/yetus/maven/plugin/fileops/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | /**
20 | * Utilities for various file operations.
21 | */
22 | package org.apache.yetus.maven.plugin.fileops;
23 |
--------------------------------------------------------------------------------
/yetus-maven-plugin/src/main/resources/licenses/ASL20.txt:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
--------------------------------------------------------------------------------