diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 5652e79d1c4..62566fa6e1e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,23 +1,29 @@ ##### SUMMARY + ##### ISSUE TYPE + + - Bugfix Pull Request - Docs Pull Request - Feature Pull Request - Test Pull Request ##### COMPONENT NAME + ##### ADDITIONAL INFORMATION + + ```paste below ``` diff --git a/hacking/README.md b/hacking/README.md index d9f4c896198..51f17202ed5 100644 --- a/hacking/README.md +++ b/hacking/README.md @@ -9,14 +9,18 @@ ansible from a git checkout using python >= 3.10. First, set up your environment to run from the checkout: - $ source ./hacking/env-setup +```shell +source ./hacking/env-setup +``` You will need some basic prerequisites installed. If you do not already have them and do not wish to install them from your operating system package manager, you can install them from pip - $ easy_install pip # if pip is not already available - $ pip install -r requirements.txt +```shell +easy_install pip # if pip is not already available +pip install -r requirements.txt +``` From there, follow ansible instructions on docs.ansible.com as normal. @@ -28,7 +32,9 @@ a module outside of the ansible program, locally, on the current machine. Example: - $ ./hacking/test-module.py -m lib/ansible/modules/command.py -a "echo hi" +```shell +./hacking/test-module.py -m lib/ansible/modules/command.py -a "echo hi" +``` This is a good way to insert a breakpoint into a module, for instance. @@ -45,8 +51,10 @@ parent: Use: - $ ./hacking/test-module.py -m module \ - -a '{"parent": {"child": [{"item": "first", "val": "foo"}, {"item": "second", "val": "bar"}]}}' +```shell +./hacking/test-module.py -m module \ + -a '{"parent": {"child": [{"item": "first", "val": "foo"}, {"item": "second", "val": "bar"}]}}' +``` return_skeleton_generator.py ---------------------------- diff --git a/hacking/azp/README.md b/hacking/azp/README.md index 57848482285..6e833fefafa 100644 --- a/hacking/azp/README.md +++ b/hacking/azp/README.md @@ -34,25 +34,31 @@ Reducing incidental test coverage, and eventually removing incidental tests invo 1. Run the entire test suite with code coverage enabled. This is done automatically each day on Azure Pipelines. The URLs and statuses of the most recent such test runs can be found with: + ```shell hacking/azp/get_recent_coverage_runs.py ``` + The branch name defaults to `devel`. 2. Download code coverage data from Azure Pipelines for local analysis. Example: + ```shell # download results to ansible/ansible directory under cwd # substitute the correct run number for the Azure Pipelines coverage run you want to download hacking/azp/download.py 14075 --artifacts --run-metadata -v ``` + 3. Analyze code coverage data to see which portions of the code are covered by each test. Example: - ```shell script + + ```shell # make sure ansible-test is in $PATH source hacking/env-setup # run the script using whichever directory results were downloaded into hacking/azp/incidental.py 14075/ ``` + 4. Create new intentional tests, or extend existing ones, to cover code that is currently covered by incidental tests. Reports are created by default in a ``test/results/.tmp/incidental/{hash}/reports/`` directory. The ``{hash}`` value is based on the input files used to generate the report. @@ -90,7 +96,7 @@ If the coverage is for Python code a comment on the right side will indicate the Below is an example of a report: -``` +```text Target: incidental_win_psexec GitHub: https://github.com/ansible/ansible/blob/6994ef0b554a816f02e0771cb14341a421f7cead/test/integration/targets/incidental_win_psexec diff --git a/hacking/backport/README.md b/hacking/backport/README.md index 587ae26450a..3fb212b33e0 100644 --- a/hacking/backport/README.md +++ b/hacking/backport/README.md @@ -6,26 +6,25 @@ variable called `GITHUB_TOKEN`. To generate a Github token, go to https://github.com/settings/tokens/new -### `backport_of_line_adder.py` +## `backport_of_line_adder.py` This script will attempt to add a reference line ("Backport of ...") to a new backport PR. It is called like this: -``` +```shell ./backport_of_line_adder.py ``` However, it contains some logic to try to automatically deduce the original PR for you. You can trigger that logic by making the second argument be `auto`. -``` +```shell ./backport_of_line_adder.py 12345 auto ``` -... for example, will look for an appropriate reference to add to backport PR -#12345. +... for example, will look for an appropriate reference to add to backport PR #12345. The script will prompt you before making any changes, and give you a chance to review the PR that it is about to reference. diff --git a/hacking/deprecated_issue_template.md b/hacking/deprecated_issue_template.md index 45a8d37ad06..b0f53ac1035 100644 --- a/hacking/deprecated_issue_template.md +++ b/hacking/deprecated_issue_template.md @@ -1,34 +1,43 @@ ##### SUMMARY + %(component)s contains call to Display.deprecated or AnsibleModule.deprecate and is scheduled for removal -``` +```text %(line)s ``` ##### ISSUE TYPE - - Bug Report + +- Bug Report ##### COMPONENT NAME -``` + +```text %(path)s ``` ##### ANSIBLE VERSION -``` + +```text %(version)s ``` ##### CONFIGURATION + N/A ##### OS / ENVIRONMENT + N/A ##### STEPS TO REPRODUCE + N/A ##### EXPECTED RESULTS + N/A ##### ACTUAL RESULTS + N/A diff --git a/hacking/ticket_stubs/bug_internal_api.md b/hacking/ticket_stubs/bug_internal_api.md index 2b3568fc921..76a3bb085ca 100644 --- a/hacking/ticket_stubs/bug_internal_api.md +++ b/hacking/ticket_stubs/bug_internal_api.md @@ -13,11 +13,11 @@ but this does not seem to match that case. If you really need a stable API target to use Ansible, consider using ansible-runner: - * https://github.com/ansible/ansible-runner +* https://github.com/ansible/ansible-runner Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time. If you or anyone else has any further questions, please let us know by using any of the communication methods listed in the page below: - * https://docs.ansible.com/ansible/latest/community/communication.html +* https://docs.ansible.com/ansible/latest/community/communication.html Thank you once again for this and your interest in Ansible! diff --git a/hacking/ticket_stubs/bug_wrong_repo.md b/hacking/ticket_stubs/bug_wrong_repo.md index 8ea5ca01d75..b711e85f3ae 100644 --- a/hacking/ticket_stubs/bug_wrong_repo.md +++ b/hacking/ticket_stubs/bug_wrong_repo.md @@ -4,35 +4,33 @@ Thanks very much for your interest in Ansible. It means a lot to us. This appears to be something that should be filed against another project or bug tracker. Here's why: - * FILL IN +* FILL IN << CHOOSE AS APPROPRIATE >> - * https://github.com/ansible-community/ansible-lint - * https://github.com/ansible/ansible-runner - * https://github.com/ansible/ansible-navigator - * https://github.com/ansible-community/antsibull - * https://github.com/ansible-community/ara - * https://github.com/ansible/awx - * https://github.com/ansible-collections/community.general - * https://github.com/ansible-community/molecule - * For AAP or Tower licensees report issues via your Red Hat representative or https://issues.redhat.com +* https://github.com/ansible-community/ansible-lint +* https://github.com/ansible/ansible-runner +* https://github.com/ansible/ansible-navigator +* https://github.com/ansible-community/antsibull +* https://github.com/ansible-community/ara +* https://github.com/ansible/awx +* https://github.com/ansible-collections/community.general +* https://github.com/ansible-community/molecule +* For AAP or Tower licensees report issues via your Red Hat representative or https://issues.redhat.com If you can stop by the tracker or forum for one of those projects, we'd appreciate it. Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time. Should you still wish to discuss things further, or if you disagree with our thought process, please stop by one of our two mailing lists: - * https://groups.google.com/forum/#!forum/ansible-devel - * Matrix: [#devel:ansible.im](https://matrix.to/#/#devel:ansible.im) - * IRC: #ansible-devel on [irc.libera.chat](https://libera.chat/) +* https://groups.google.com/forum/#!forum/ansible-devel +* Matrix: [#devel:ansible.im](https://matrix.to/#/#devel:ansible.im) +* IRC: #ansible-devel on [irc.libera.chat](https://libera.chat/) We'd be happy to discuss things. See this page for a complete list of communication channels and their purposes: - * https://docs.ansible.com/ansible/latest/community/communication.html +* https://docs.ansible.com/ansible/latest/community/communication.html Thank you once again! - - diff --git a/hacking/ticket_stubs/collections.md b/hacking/ticket_stubs/collections.md index 57ab46f11a6..eecd8151f15 100644 --- a/hacking/ticket_stubs/collections.md +++ b/hacking/ticket_stubs/collections.md @@ -4,13 +4,13 @@ Thank you very much for your submission to Ansible. It means a lot to us that yo Since Ansible 2.10 we are no longer accepting new modules/plugins into Ansible core. However, we recommend looking into providing this functionality through Ansible Galaxy via Ansible Collections. You can find more information about collections at: - * https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html. +* https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html. Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time. The mailing list and irc are great ways to ask questions, or post if you don't think this particular issue is resolved. See this page for a complete and up to date list of communication channels and their purposes: - * https://docs.ansible.com/ansible/latest/community/communication.html +* https://docs.ansible.com/ansible/latest/community/communication.html Thank you once again for this and your interest in Ansible! diff --git a/hacking/ticket_stubs/no_thanks.md b/hacking/ticket_stubs/no_thanks.md index 3cae1c84f52..2e2143fe619 100644 --- a/hacking/ticket_stubs/no_thanks.md +++ b/hacking/ticket_stubs/no_thanks.md @@ -5,15 +5,14 @@ Thanks very much for your submission to Ansible. It means a lot to us that you' Unfortunately, we're not sure if we want this feature in the program, and I don't want this to seem confrontational. Our reasons for this are: - * (A) INSERT ITEM HERE +* (A) INSERT ITEM HERE However, we're absolutely always up for discussion. Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time. If you or anyone else has any further questions, please let us know by using any of the communication methods listed in the page below: - * https://docs.ansible.com/ansible/latest/community/communication.html +* https://docs.ansible.com/ansible/latest/community/communication.html In the future, sometimes starting a discussion on the development list prior to implementing a feature can make getting things included a little easier, but it's not always necessary. Thank you once again for this and your interest in Ansible! - diff --git a/hacking/ticket_stubs/pr_duplicate.md b/hacking/ticket_stubs/pr_duplicate.md index ef692a0b016..01a2a72809f 100644 --- a/hacking/ticket_stubs/pr_duplicate.md +++ b/hacking/ticket_stubs/pr_duplicate.md @@ -4,7 +4,7 @@ Thanks very much for your submission to Ansible. It means a lot to us that you' It looks like the work from this pull request is a duplicate of the following PR(s): - * INSERT PR(S) HERE +* INSERT PR(S) HERE Based on this, we are going to close this PR in favor of the above as a consolidated location to keep track of the issue. @@ -15,7 +15,6 @@ In the future, sometimes starting a discussion on the development list prior to Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time. If you or anyone else has any further questions, please let us know by using any of the communication methods listed in the page below: - * https://docs.ansible.com/ansible/latest/community/communication.html +* https://docs.ansible.com/ansible/latest/community/communication.html Thank you once again for this and your interest in Ansible! - diff --git a/hacking/ticket_stubs/pr_merged.md b/hacking/ticket_stubs/pr_merged.md index 52c671f9f13..0183ee90630 100644 --- a/hacking/ticket_stubs/pr_merged.md +++ b/hacking/ticket_stubs/pr_merged.md @@ -10,6 +10,6 @@ The mailing list and irc are great ways to ask questions, or post if you don't t See this page for a complete and up to date list of communication channels and their purposes: - * https://docs.ansible.com/ansible/latest/community/communication.html +* https://docs.ansible.com/ansible/latest/community/communication.html Thank you! diff --git a/hacking/ticket_stubs/proposal.md b/hacking/ticket_stubs/proposal.md index 5e5275f24de..25d4cb403fe 100644 --- a/hacking/ticket_stubs/proposal.md +++ b/hacking/ticket_stubs/proposal.md @@ -8,12 +8,11 @@ https://github.com/ansible/proposals/blob/master/proposals_process_proposal.md Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time. The mailing list and irc are great ways to ask questions, or post if you don't think this particular issue is resolved. - * #ansible-devel on [irc.libera.chat](https://libera.chat/) - * https://groups.google.com/forum/#!forum/ansible-devel - +* #ansible-devel on [irc.libera.chat](https://libera.chat/) +* https://groups.google.com/forum/#!forum/ansible-devel Or check this page for a more complete list of communication channels and their purposes: - * https://docs.ansible.com/ansible/latest/community/communication.html +* https://docs.ansible.com/ansible/latest/community/communication.html Thank you! diff --git a/hacking/ticket_stubs/question_not_bug.md b/hacking/ticket_stubs/question_not_bug.md index 10f70fff3c4..f4b143fbb60 100644 --- a/hacking/ticket_stubs/question_not_bug.md +++ b/hacking/ticket_stubs/question_not_bug.md @@ -4,16 +4,15 @@ Thanks very much for your interest in Ansible. It means a lot to us. This appears to be a user question, and we'd like to direct these kinds of things to either the mailing list or the IRC channel. - * IRC: #ansible on [irc.libera.chat](https://libera.chat/) - * mailing list: https://groups.google.com/forum/#!forum/ansible-project +* IRC: #ansible on [irc.libera.chat](https://libera.chat/) +* mailing list: https://groups.google.com/forum/#!forum/ansible-project See this page for a complete and up to date list of communication channels and their purposes: - * https://docs.ansible.com/ansible/latest/community/communication.html +* https://docs.ansible.com/ansible/latest/community/communication.html Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time. If don't you think this particular issue is resolved, you should still stop by there first, we'd appreciate it. This allows us to keep the issue tracker for bugs, pull requests, RFEs and the like. Thank you once again and we look forward to seeing you on the list or IRC. Thanks! - diff --git a/hacking/ticket_stubs/resolved.md b/hacking/ticket_stubs/resolved.md index 1d132dc3c7b..8eedbcfc156 100644 --- a/hacking/ticket_stubs/resolved.md +++ b/hacking/ticket_stubs/resolved.md @@ -11,6 +11,6 @@ The mailing list and irc are great ways to ask questions, or post if you don't t See this page for a complete list of communication channels and their purposes: - * https://docs.ansible.com/ansible/latest/community/communication.html +* https://docs.ansible.com/ansible/latest/community/communication.html Thank you! diff --git a/hacking/ticket_stubs/wider_discussion.md b/hacking/ticket_stubs/wider_discussion.md index 05a6a3d16b9..74585816fc7 100644 --- a/hacking/ticket_stubs/wider_discussion.md +++ b/hacking/ticket_stubs/wider_discussion.md @@ -5,18 +5,17 @@ Thanks very much for your submission to Ansible. It means a lot to us. We are interested in this idea and would like to see a wider discussion on it on one of our lists. Reasons for this include: - * INSERT REASONS! +* INSERT REASONS! Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time. Can you please post on ansible-development list so we can talk about this idea with the wider group? - * https://groups.google.com/forum/#!forum/ansible-devel - * Matrix: [#devel:ansible.im](https://matrix.to/#/#devel:ansible.im) - * #ansible-devel on [irc.libera.chat](https://libera.chat/) +* https://groups.google.com/forum/#!forum/ansible-devel +* Matrix: [#devel:ansible.im](https://matrix.to/#/#devel:ansible.im) +* #ansible-devel on [irc.libera.chat](https://libera.chat/) For other alternatives, check this page for a more complete list of communication channels and their purposes: - * https://docs.ansible.com/ansible/latest/community/communication.html +* https://docs.ansible.com/ansible/latest/community/communication.html Thank you once again for this and your interest in Ansible! - diff --git a/lib/ansible/galaxy/data/container/README.md b/lib/ansible/galaxy/data/container/README.md index 1b66bdb5a27..f9b791eefc0 100644 --- a/lib/ansible/galaxy/data/container/README.md +++ b/lib/ansible/galaxy/data/container/README.md @@ -3,7 +3,7 @@ Adds a service to your [Ansible Container](https://github.com/ansible/ansible-container) project. Run the following commands to install the service: -``` +```shell # Set the working directory to your Ansible Container project root $ cd myproject @@ -15,7 +15,8 @@ $ ansible-container install - [Ansible Container](https://github.com/ansible/ansible-container) - An existing Ansible Container project. To create a project, simply run the following: - ``` + + ```shell # Create an empty project directory $ mkdir myproject @@ -28,7 +29,6 @@ $ ansible-container install - Continue listing any prerequisites here... - ## Role Variables A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set @@ -45,5 +45,3 @@ BSD ## Author Information An optional section for the role authors to include contact information, or a website (HTML is not allowed). - - diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/failure/README.md b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/failure/README.md index bf1003fa9e4..d158a98721d 100644 --- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/failure/README.md +++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/failure/README.md @@ -1,3 +1,4 @@ README ------ + This is a simple collection used to test failures with ``ansible-test sanity --test validate-modules``. diff --git a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/ps_only/README.md b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/ps_only/README.md index bbdd513882a..9c1c1c34f27 100644 --- a/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/ps_only/README.md +++ b/test/integration/targets/ansible-test-sanity-validate-modules/ansible_collections/ns/ps_only/README.md @@ -1,3 +1,4 @@ README ------ + This is a simple PowerShell-only collection used to verify that ``ansible-test`` works on a collection. diff --git a/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/README.md b/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/README.md index d8138d3b5be..67b8a83ba97 100644 --- a/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/README.md +++ b/test/integration/targets/ansible-test-sanity/ansible_collections/ns/col/README.md @@ -1,3 +1,4 @@ README ------ + This is a simple collection used to verify that ``ansible-test`` works on a collection. diff --git a/test/lib/ansible_test/_internal/commands/sanity/__init__.py b/test/lib/ansible_test/_internal/commands/sanity/__init__.py index 26822e0710b..067d3f0130c 100644 --- a/test/lib/ansible_test/_internal/commands/sanity/__init__.py +++ b/test/lib/ansible_test/_internal/commands/sanity/__init__.py @@ -878,6 +878,7 @@ class SanityCodeSmellTest(SanitySingleVersion): self.__include_directories: bool = self.config.get('include_directories') self.__include_symlinks: bool = self.config.get('include_symlinks') self.__py2_compat: bool = self.config.get('py2_compat', False) + self.__error_code: str | None = self.config.get('error_code', None) else: self.output = None self.extensions = [] @@ -893,6 +894,7 @@ class SanityCodeSmellTest(SanitySingleVersion): self.__include_directories = False self.__include_symlinks = False self.__py2_compat = False + self.__error_code = None if self.no_targets: mutually_exclusive = ( @@ -911,6 +913,11 @@ class SanityCodeSmellTest(SanitySingleVersion): if problems: raise ApplicationError('Sanity test "%s" option "no_targets" is mutually exclusive with options: %s' % (self.name, ', '.join(problems))) + @property + def error_code(self) -> t.Optional[str]: + """Error code for ansible-test matching the format used by the underlying test program, or None if the program does not use error codes.""" + return self.__error_code + @property def all_targets(self) -> bool: """True if test targets will not be filtered using includes, excludes, requires or changes. Mutually exclusive with no_targets.""" @@ -995,6 +1002,8 @@ class SanityCodeSmellTest(SanitySingleVersion): pattern = '^(?P[^:]*):(?P[0-9]+):(?P[0-9]+): (?P.*)$' elif self.output == 'path-message': pattern = '^(?P[^:]*): (?P.*)$' + elif self.output == 'path-line-column-code-message': + pattern = '^(?P[^:]*):(?P[0-9]+):(?P[0-9]+): (?P[^:]*): (?P.*)$' else: raise ApplicationError('Unsupported output type: %s' % self.output) @@ -1024,6 +1033,7 @@ class SanityCodeSmellTest(SanitySingleVersion): path=m['path'], line=int(m.get('line', 0)), column=int(m.get('column', 0)), + code=m.get('code'), ) for m in matches] messages = settings.process_errors(messages, paths) diff --git a/test/sanity/code-smell/pymarkdown.config.json b/test/sanity/code-smell/pymarkdown.config.json new file mode 100644 index 00000000000..afe83a35c01 --- /dev/null +++ b/test/sanity/code-smell/pymarkdown.config.json @@ -0,0 +1,11 @@ +{ + "plugins": { + "line-length": { + "line_length": 160, + "code_block_line_length": 160 + }, + "first-line-heading": { + "enabled": false + } + } +} diff --git a/test/sanity/code-smell/pymarkdown.json b/test/sanity/code-smell/pymarkdown.json new file mode 100644 index 00000000000..986848db4bc --- /dev/null +++ b/test/sanity/code-smell/pymarkdown.json @@ -0,0 +1,7 @@ +{ + "output": "path-line-column-code-message", + "error_code": "ansible-test", + "extensions": [ + ".md" + ] +} diff --git a/test/sanity/code-smell/pymarkdown.py b/test/sanity/code-smell/pymarkdown.py new file mode 100644 index 00000000000..721c8937ef9 --- /dev/null +++ b/test/sanity/code-smell/pymarkdown.py @@ -0,0 +1,64 @@ +"""Sanity test for Markdown files.""" +from __future__ import annotations + +import pathlib +import re +import subprocess +import sys + +import typing as t + + +def main() -> None: + paths = sys.argv[1:] or sys.stdin.read().splitlines() + + cmd = [ + sys.executable, + '-m', 'pymarkdown', + '--config', pathlib.Path(__file__).parent / 'pymarkdown.config.json', + '--strict-config', + 'scan', + ] + paths + + process = subprocess.run( + cmd, + stdin=subprocess.DEVNULL, + capture_output=True, + check=False, + text=True, + ) + + if process.stderr: + print(process.stderr.strip(), file=sys.stderr) + sys.exit(1) + + if not (stdout := process.stdout.strip()): + return + + pattern = re.compile(r'^(?P[^:]*:[0-9]+:[0-9]+): (?P[^:]*): (?P.*) \((?P.*)\)$') + matches = parse_to_list_of_dict(pattern, stdout) + results = [f"{match['path_line_column']}: {match['aliases'].split(', ')[0]}: {match['message']}" for match in matches] + + print('\n'.join(results)) + + +def parse_to_list_of_dict(pattern: re.Pattern, value: str) -> list[dict[str, t.Any]]: + matched = [] + unmatched = [] + + for line in value.splitlines(): + match = re.search(pattern, line) + + if match: + matched.append(match.groupdict()) + else: + unmatched.append(line) + + if unmatched: + raise Exception('Pattern {pattern!r} did not match values:\n' + '\n'.join(unmatched)) + + return matched + + +if __name__ == '__main__': + main() diff --git a/test/sanity/code-smell/pymarkdown.requirements.in b/test/sanity/code-smell/pymarkdown.requirements.in new file mode 100644 index 00000000000..f0077713f65 --- /dev/null +++ b/test/sanity/code-smell/pymarkdown.requirements.in @@ -0,0 +1 @@ +pymarkdownlnt diff --git a/test/sanity/code-smell/pymarkdown.requirements.txt b/test/sanity/code-smell/pymarkdown.requirements.txt new file mode 100644 index 00000000000..896f166dac5 --- /dev/null +++ b/test/sanity/code-smell/pymarkdown.requirements.txt @@ -0,0 +1,7 @@ +# edit "pymarkdown.requirements.in" and generate with: hacking/update-sanity-requirements.py --test pymarkdown +application-properties==0.6.0 +Columnar==1.4.1 +pymarkdownlnt==0.9.11 +toolz==0.12.0 +typing_extensions==4.5.0 +wcwidth==0.2.6 diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index 5a3c1f4d48b..bdb7dd69ac6 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -178,3 +178,26 @@ test/units/utils/collection_loader/fixtures/collections_masked/ansible_collectio test/units/utils/collection_loader/fixtures/collections_masked/ansible_collections/testns/__init__.py empty-init # testing that collections don't need inits test/units/utils/collection_loader/fixtures/collections_masked/ansible_collections/testns/testcoll/__init__.py empty-init # testing that collections don't need inits test/units/utils/collection_loader/test_collection_loader.py pylint:undefined-variable # magic runtime local var splatting +.github/CONTRIBUTING.md pymarkdown:line-length +hacking/backport/README.md pymarkdown:no-bare-urls +hacking/ticket_stubs/bug_internal_api.md pymarkdown:no-bare-urls +hacking/ticket_stubs/bug_wrong_repo.md pymarkdown:no-bare-urls +hacking/ticket_stubs/collections.md pymarkdown:line-length +hacking/ticket_stubs/collections.md pymarkdown:no-bare-urls +hacking/ticket_stubs/guide_newbie_about_gh_and_contributing_to_ansible.md pymarkdown:no-bare-urls +hacking/ticket_stubs/no_thanks.md pymarkdown:line-length +hacking/ticket_stubs/no_thanks.md pymarkdown:no-bare-urls +hacking/ticket_stubs/pr_duplicate.md pymarkdown:no-bare-urls +hacking/ticket_stubs/pr_merged.md pymarkdown:no-bare-urls +hacking/ticket_stubs/proposal.md pymarkdown:no-bare-urls +hacking/ticket_stubs/question_not_bug.md pymarkdown:no-bare-urls +hacking/ticket_stubs/resolved.md pymarkdown:no-bare-urls +hacking/ticket_stubs/wider_discussion.md pymarkdown:no-bare-urls +lib/ansible/galaxy/data/apb/README.md pymarkdown:line-length +lib/ansible/galaxy/data/container/README.md pymarkdown:line-length +lib/ansible/galaxy/data/default/role/README.md pymarkdown:line-length +lib/ansible/galaxy/data/network/README.md pymarkdown:line-length +README.md pymarkdown:line-length +test/integration/targets/ansible-vault/invalid_format/README.md pymarkdown:no-bare-urls +test/support/README.md pymarkdown:no-bare-urls +test/units/cli/test_data/role_skeleton/README.md pymarkdown:line-length diff --git a/test/support/README.md b/test/support/README.md index 850bc9214d3..d5244823d11 100644 --- a/test/support/README.md +++ b/test/support/README.md @@ -1,4 +1,4 @@ -# IMPORTANT! +# IMPORTANT Files under this directory are not actual plugins and modules used by Ansible and as such should **not be modified**. They are used for testing purposes diff --git a/test/units/cli/test_data/collection_skeleton/README.md b/test/units/cli/test_data/collection_skeleton/README.md index 4cfd8afef84..2e3e4ce5713 100644 --- a/test/units/cli/test_data/collection_skeleton/README.md +++ b/test/units/cli/test_data/collection_skeleton/README.md @@ -1 +1 @@ -A readme \ No newline at end of file +A readme diff --git a/test/units/cli/test_data/collection_skeleton/docs/My Collection.md b/test/units/cli/test_data/collection_skeleton/docs/My Collection.md index 6fa917f23ec..0d6781bc711 100644 --- a/test/units/cli/test_data/collection_skeleton/docs/My Collection.md +++ b/test/units/cli/test_data/collection_skeleton/docs/My Collection.md @@ -1 +1 @@ -Welcome to my test collection doc for {{ namespace }}. \ No newline at end of file +Welcome to my test collection doc for {{ namespace }}. diff --git a/test/units/galaxy/test_collection.py b/test/units/galaxy/test_collection.py index 6f0622a7b8e..991184aec1e 100644 --- a/test/units/galaxy/test_collection.py +++ b/test/units/galaxy/test_collection.py @@ -824,7 +824,7 @@ def test_build_with_symlink_inside_collection(collection_input): actual_file = secure_hash_s(linked_file_obj.read()) linked_file_obj.close() - assert actual_file == '63444bfc766154e1bc7557ef6280de20d03fcd81' + assert actual_file == '08f24200b9fbe18903e7a50930c9d0df0b8d7da3' # shasum test/units/cli/test_data/collection_skeleton/README.md def test_publish_no_wait(galaxy_server, collection_artifact, monkeypatch):