Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanity tests failing in chocolatey.chocolatey #78

Closed
dmsimard opened this issue May 6, 2022 · 4 comments · Fixed by #82
Closed

Sanity tests failing in chocolatey.chocolatey #78

dmsimard opened this issue May 6, 2022 · 4 comments · Fixed by #82
Labels
5 - Released The issue has been resolved, and released to the public for consumption Documentation Issues for changes that only need to change documentation Priority_LOW Issues that are low priority, and will most likely only be fixed by the community Tests Issues related to the tests (NUnit, xUnit, Pester, Etc)
Milestone

Comments

@dmsimard
Copy link

dmsimard commented May 6, 2022

SUMMARY

We are running sanity tests across every collection included in the Ansible community package (as part of this issue) and found that ansible-test sanity --docker against chocolatey.chocolatey 1.2.0 fails with ansible-core 2.13.0rc1 in ansible 6.0.0a2.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

n/a

ANSIBLE VERSION
ansible [core 2.13.0rc1]
COLLECTION VERSION
1.2.0
STEPS TO REPRODUCE
ansible-test sanity --docker
EXPECTED RESULTS

Tests are either passing or ignored.

ACTUAL RESULTS
ERROR: Found 98 pslint issue(s) which need to be resolved:
ERROR: plugins/modules/win_chocolatey.ps1:81:10: PSUseSingularNouns: The cmdlet 'Get-CommonChocolateyArguments' uses a plural noun. A singular noun should be used instead.
ERROR: plugins/modules/win_chocolatey.ps1:92:5: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:94:5: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:98:12: PSUseConsistentWhitespace: Use space after a comma.
ERROR: plugins/modules/win_chocolatey.ps1:101:10: PSUseSingularNouns: The cmdlet 'Get-InstallChocolateyArguments' uses a plural noun. A singular noun should be used instead.
ERROR: plugins/modules/win_chocolatey.ps1:202:12: PSUseConsistentWhitespace: Use space after a comma.
ERROR: plugins/modules/win_chocolatey.ps1:263:13: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:264:129: PSUseConsistentWhitespace: Use space after a comma.
ERROR: plugins/modules/win_chocolatey.ps1:265:13: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:282:9: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:288:9: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:344:5: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:345:1: PSAvoidLongLines: Line exceeds the configured maximum length of 160 characters
ERROR: plugins/modules/win_chocolatey.ps1:351:1: PSAvoidLongLines: Line exceeds the configured maximum length of 160 characters
ERROR: plugins/modules/win_chocolatey.ps1:367:29: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:371:29: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:371:54: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:410:35: PSPlaceOpenBrace: There is no new line after open brace.
ERROR: plugins/modules/win_chocolatey.ps1:410:35: PSUseConsistentWhitespace: Use space after open brace.
ERROR: plugins/modules/win_chocolatey.ps1:425:9: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:429:13: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:442:29: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:464:9: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:470:12: PSUseConsistentWhitespace: Use space after a comma.
ERROR: plugins/modules/win_chocolatey.ps1:475:29: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:476:29: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:483:5: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:511:29: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:512:29: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:590:29: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:591:29: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:664:29: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:665:29: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:687:5: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:792:5: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:809:1: PSAvoidLongLines: Line exceeds the configured maximum length of 160 characters
ERROR: plugins/modules/win_chocolatey.ps1:810:17: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:871:17: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey.ps1:874:13: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: plugins/modules/win_chocolatey_config.ps1:25:9: PSUseConsistentWhitespace: Use space after a comma.
ERROR: plugins/modules/win_chocolatey_facts.ps1:108:10: PSUseSingularNouns: The cmdlet 'Get-ChocolateyPackages' uses a plural noun. A singular noun should be used instead.
ERROR: plugins/modules/win_chocolatey_facts.ps1:131:10: PSUseSingularNouns: The cmdlet 'Get-ChocolateySources' uses a plural noun. A singular noun should be used instead.
ERROR: plugins/modules/win_chocolatey_facts.ps1:188:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_facts.ps1:189:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_facts.ps1:190:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_facts.ps1:191:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_facts.ps1:192:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_facts.ps1:193:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_facts.ps1:194:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_facts.ps1:196:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_facts.ps1:205:18: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_facts.ps1:206:18: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_facts.ps1:207:18: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_feature.ps1:15:25: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_feature.ps1:16:15: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:13:25: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:14:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:15:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:16:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:17:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:18:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:19:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:21:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:22:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:23:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:24:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:25:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:28:25: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:32:25: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:123:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:124:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:125:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:126:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:127:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:128:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:129:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:131:32: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:216:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:217:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:218:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:219:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:220:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:221:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:222:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:224:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey/files/tools/chocolateyinstall.ps1:10:1: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: tests/integration/targets/win_chocolatey/files/tools/chocolateyinstall.ps1:15:1: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: tests/integration/targets/win_chocolatey/files/tools/chocolateyinstall.ps1:20:1: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: tests/integration/targets/win_chocolatey/files/tools/chocolateyinstall.ps1:25:1: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: tests/integration/targets/win_chocolatey/files/tools/chocolateyinstall.ps1:30:1: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:53:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:54:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:55:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:56:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:57:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:58:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:59:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:61:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: Found 10 validate-modules issue(s) which need to be resolved:
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.notes.3: Directive "M(win_hotfix)" must contain a FQCN @ data['notes'][3]. Got 'If C(become) is unavailable, use M(win_hotfix) to install hotfixes instead of M(win_chocolatey) as M(win_hotfix) avoids using C(wusa.exe) which cannot be run without C(become).'
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.allow_empty_checksums.description: Directive "M(win_chocolatey_feature)" must contain a FQCN for dictionary value @ data['options']['allow_empty_checksums']['description']. Got ['Allow empty checksums to be used for downloaded resource from non-secure locations.', 'Use M(win_chocolatey_feature) with the name C(allowEmptyChecksums) to control this option globally.']
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.ignore_checksums.description: Directive "M(win_chocolatey_feature)" must contain a FQCN for dictionary value @ data['options']['ignore_checksums']['description']. Got ['Ignore the checksums provided by the package.', 'Use M(win_chocolatey_feature) with the name C(checksumFiles) to control this option globally.']
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.proxy_password.description: Directive "M(win_chocolatey_config)" must contain a FQCN for dictionary value @ data['options']['proxy_password']['description']. Got ['Proxy password used to install Chocolatey and the package.', 'This value is exposed as a command argument and any privileged account can see this value when the module is running Chocolatey, define the password on the global config level with M(win_chocolatey_config) with name C(proxyPassword) to avoid this.']
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.proxy_url.description: Directive "M(win_chocolatey_config)" must contain a FQCN for dictionary value @ data['options']['proxy_url']['description']. Got ['Proxy URL used to install chocolatey and the package.', 'Use M(win_chocolatey_config) with the name C(proxy) to control this option globally.']
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.proxy_username.description: Directive "M(win_chocolatey_config)" must contain a FQCN for dictionary value @ data['options']['proxy_username']['description']. Got ['Proxy username used to install Chocolatey and the package.', 'Before Ansible 2.7, users with double quote characters C(") would need to be escaped with C(\\) beforehand. This is no longer necessary.', 'Use M(win_chocolatey_config) with the name C(proxyUser) to control this option globally.']
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.source.description: Directive "M(win_chocolatey_source)" must contain a FQCN for dictionary value @ data['options']['source']['description']. Got ['Specify the source to retrieve the package from.', 'Use M(win_chocolatey_source) to manage global sources.', 'This value can either be the URL to a Chocolatey feed, a path to a folder containing C(.nupkg) packages or the name of a source defined by M(win_chocolatey_source).', 'This value is also used when Chocolatey is not installed as the location of the install.ps1 script and only supports URLs for this case.']
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.source_password.description: Directive "M(win_chocolatey_source)" must contain a FQCN for dictionary value @ data['options']['source_password']['description']. Got ['The password for I(source_username).', 'This value is exposed as a command argument and any privileged account can see this value when the module is running Chocolatey, define the credentials with a source with M(win_chocolatey_source) to avoid this.']
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.source_username.description: Directive "M(win_chocolatey_source)" must contain a FQCN for dictionary value @ data['options']['source_username']['description']. Got ['A username to use with I(source) when accessing a feed that requires authentication.', 'It is recommended you define the credentials on a source with M(win_chocolatey_source) instead of passing it per task.']
ERROR: plugins/modules/win_chocolatey_facts.py:0:0: invalid-documentation-markup: DOCUMENTATION.notes.0: Directive "M(win_chocolatey)" must contain a FQCN @ data['notes'][0]. Got 'Chocolatey must be installed beforehand, use M(win_chocolatey) to do this.'
ERROR: The 2 sanity test(s) listed below (out of 43) failed. See error output above for details.
pslint
validate-modules
ERROR: Command "podman exec ansible-test-controller-rFBEiJJO /usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/root/ansible_collections/chocolatey/chocolatey LC_ALL=en_US.UTF-8 /usr/bin/python3.10 /root/ansible/bin/ansible-test sanity --containers '{}' --skip-test pylint --metadata tests/output/.tmp/metadata-udq8k66x.json --truncate 0 --color no --host-path tests/output/.tmp/host-l99abxit" returned exit status 1.
@vexx32
Copy link
Member

vexx32 commented May 6, 2022

Thanks for letting us know! I'll re-verify these results against the current master branch and see what's still outstanding, and then we'll look to get a release sorted out.

Most if not all of the PowerShell ones may already be fixed at the latest commit, and any that remain I'll file PRs to sort out; they should be straightforward.

The ones I'm less sure of are the module documentation errors. Is there a doc page listing examples of how these external module / option references are supposed to be listed? I can take a stab at it, but I'd rather have a good idea of what I'm doing first there. 🙂

@pauby pauby added the Priority_LOW Issues that are low priority, and will most likely only be fixed by the community label May 6, 2022
@pauby
Copy link
Member

pauby commented May 6, 2022

There appears to be no timescales attached to the PR, just a suggestion of "1-2 months" which isn't helpful.

Until we get that I'm going to mark this as Low Priority.

@vexx32 Your question would likely get a better response over at that original PR.

@pauby pauby added Documentation Issues for changes that only need to change documentation 0 - _Triaging Issue is accepted, but a milestone has yet to be added for the issue Tests Issues related to the tests (NUnit, xUnit, Pester, Etc) labels May 6, 2022
@dmsimard
Copy link
Author

Hey and thanks for looking into this.

Thanks for letting us know! I'll re-verify these results against the current master branch and see what's still outstanding, and then we'll look to get a release sorted out.

@vexx32 For what it's worth, I've reran the tests against the same release but by installing with ansible-galaxy collection install instead of the release tarball and confirmed that I was able to reproduce the issues. I didn't test from git.

Some of these might be new from ansible-core or ansible-test 2.13, the changelog is here: https://github.com/ansible/ansible/blob/stable-2.13/changelogs/CHANGELOG-v2.13.rst

The ones I'm less sure of are the module documentation errors. Is there a doc page listing examples of how these external module / option references are supposed to be listed? I can take a stab at it, but I'd rather have a good idea of what I'm doing first there. slightly_smiling_face

I haven't investigated yet but I know there's at least the following docs:

There appears to be no timescales attached to the ansible-community/community-topics#96, just a suggestion of "1-2 months" which isn't helpful.

@pauby there's a broad scope in the linked issue that may take longer but in the meantime it'd be great if we could get the number of sanity tests errors (across every included collections) down in time for the release of ansible 6.0.0, 2022-06-21 (see roadmap).

In other words, it's not the end of the world but we would be grateful if you had the opportunity to fix the errors or put them in an ignore file (like this example, if appropriate) and tag a new release by feature freeze on 2022-05-24.

@vexx32
Copy link
Member

vexx32 commented Jun 22, 2022

I have rerun the test against the latest collection build from Github and noted/confirmed the following issues:

Running sanity test "pslint"
ERROR: Found 91 pslint issue(s) which need to be resolved:
ERROR: plugins/module_utils/Common.psm1:139:10: PSUseSingularNouns: The cmdlet 'Get-StdoutLines' uses a plural noun. A singular noun should be used instead.
ERROR: plugins/module_utils/Common.psm1:154:9: PSUseProcessBlockForPipelineCommand: Command accepts pipeline input but has not defined a process block.
ERROR: plugins/module_utils/Packages.psm1:161:10: PSUseSingularNouns: The cmdlet 'Get-CommonChocolateyArguments' uses a plural noun. A singular noun should be used instead.
ERROR: plugins/module_utils/Packages.psm1:202:10: PSUseSingularNouns: The cmdlet 'Get-InstallChocolateyArguments' uses a plural noun. A singular noun should be used instead.
ERROR: plugins/module_utils/Packages.psm1:1086:1: PSAvoidLongLines: Line exceeds the configured maximum length of 160 characters
ERROR: plugins/module_utils/Packages.psm1:1093:1: PSAvoidLongLines: Line exceeds the configured maximum length of 160 characters
ERROR: plugins/module_utils/Packages.psm1:1099:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Packages.psm1:1100:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Packages.psm1:1101:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Packages.psm1:1102:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Packages.psm1:1103:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Packages.psm1:1104:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Sources.psm1:47:22: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Sources.psm1:48:22: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Sources.psm1:213:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Sources.psm1:214:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Sources.psm1:215:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Sources.psm1:216:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Sources.psm1:217:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Sources.psm1:218:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Sources.psm1:219:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/module_utils/Sources.psm1:221:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:21:25: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:23:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:24:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:25:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:26:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:27:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:28:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:29:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:30:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:31:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:32:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:33:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:34:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:35:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:36:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:37:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:38:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:39:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:40:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:41:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:42:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:43:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:44:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:45:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:46:31: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:134:36: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:135:36: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:136:36: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:137:36: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:138:36: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:140:36: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:141:36: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:142:36: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey.ps1:179:1: PSAvoidLongLines: Line exceeds the configured maximum length of 160 characters
ERROR: plugins/modules/win_chocolatey_config.ps1:20:25: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_config.ps1:21:15: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_config.ps1:25:25: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_facts.ps1:36:18: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_facts.ps1:37:18: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_facts.ps1:38:18: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_feature.ps1:19:25: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_feature.ps1:20:15: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:17:25: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:18:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:19:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:21:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:22:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:23:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:24:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:26:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:27:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:28:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:29:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:30:30: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:33:25: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: plugins/modules/win_chocolatey_source.ps1:37:25: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/setup_win_chocolatey/files/tools/chocolateyinstall.ps1:10:1: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: tests/integration/targets/setup_win_chocolatey/files/tools/chocolateyinstall.ps1:15:1: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: tests/integration/targets/setup_win_chocolatey/files/tools/chocolateyinstall.ps1:20:1: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: tests/integration/targets/setup_win_chocolatey/files/tools/chocolateyinstall.ps1:25:1: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: tests/integration/targets/setup_win_chocolatey/files/tools/chocolateyinstall.ps1:30:1: PSPlaceCloseBrace: Close brace does not follow a new line.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:53:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:54:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:55:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:56:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:57:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:58:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:59:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
ERROR: tests/integration/targets/win_chocolatey_source/library/choco_source.ps1:61:28: PSUseConsistentWhitespace: Use space before and after binary and assignment operators.
See documentation for help: https://docs.ansible.com/ansible-core/2.13/dev_guide/testing/sanity/pslint.html

---

Running sanity test "validate-modules"
ERROR: Found 10 validate-modules issue(s) which need to be resolved:
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.notes.3: Directive "M(win_hotfix)" must contain a FQCN @ data['notes'][3]. Got 'If C(become) is unavailable, use M(win_hotfix) to install hotfixes instead of M(win_chocolatey) as M(win_hotfix) avoids using C(wusa.exe) which cannot be run without C(become).'
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.allow_empty_checksums.description: Directive "M(win_chocolatey_feature)" must contain a FQCN for dictionary value @ data['options']['allow_empty_checksums']['description']. Got ['Allow empty checksums to be used for downloaded resource from non-secure locations.', 'Use M(win_chocolatey_feature) with the name C(allowEmptyChecksums) to control this option globally.']
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.ignore_checksums.description: Directive "M(win_chocolatey_feature)" must contain a FQCN for dictionary value @ data['options']['ignore_checksums']['description']. Got ['Ignore the checksums provided by the package.', 'Use M(win_chocolatey_feature) with the name C(checksumFiles) to control this option globally.']
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.proxy_password.description: Directive "M(win_chocolatey_config)" must contain a FQCN for dictionary value @ data['options']['proxy_password']['description']. Got ['Proxy password used to install Chocolatey and the package.', 'This value is exposed as a command argument and any privileged account can see this value when the module is running Chocolatey, define the password on the global config level with M(win_chocolatey_config) with name C(proxyPassword) to avoid this.']
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.proxy_url.description: Directive "M(win_chocolatey_config)" must contain a FQCN for dictionary value @ data['options']['proxy_url']['description']. Got ['Proxy URL used to install chocolatey and the package.', 'Use M(win_chocolatey_config) with the name C(proxy) to control this option globally.']
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.proxy_username.description: Directive "M(win_chocolatey_config)" must contain a FQCN for dictionary value @ data['options']['proxy_username']['description']. Got ['Proxy username used to install Chocolatey and the package.', 'Before Ansible 2.7, users with double quote characters C(") would need to be escaped with C(\\) beforehand. This is no longer necessary.', 'Use M(win_chocolatey_config) with the name C(proxyUser) to control this option globally.']
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.source.description: Directive "M(win_chocolatey_source)" must contain a FQCN for dictionary value @ data['options']['source']['description']. Got ['Specify the source to retrieve the package from.', 'Use M(win_chocolatey_source) to manage global sources.', 'This value can either be the URL to a Chocolatey feed, a path to a folder containing C(.nupkg) packages or the name of a source defined by M(win_chocolatey_source).', 'This value is also used when Chocolatey is not installed as the location of the install.ps1 script and only supports URLs for this case.']
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.source_password.description: Directive "M(win_chocolatey_source)" must contain a FQCN for dictionary value @ data['options']['source_password']['description']. Got ['The password for I(source_username).', 'This value is exposed as a command argument and any privileged account can see this value when the module is running Chocolatey, define the credentials with a source with M(win_chocolatey_source) to avoid this.']
ERROR: plugins/modules/win_chocolatey.py:0:0: invalid-documentation-markup: DOCUMENTATION.options.source_username.description: Directive "M(win_chocolatey_source)" must contain a FQCN for dictionary value @ data['options']['source_username']['description']. Got ['A username to use with I(source) when accessing a feed that requires authentication.', 'It is recommended you define the credentials on a source with M(win_chocolatey_source) instead of passing it per task.']
ERROR: plugins/modules/win_chocolatey_facts.py:0:0: invalid-documentation-markup: DOCUMENTATION.notes.0: Directive "M(win_chocolatey)" must contain a FQCN @ data['notes'][0]. Got 'Chocolatey must be installed beforehand, use M(win_chocolatey) to do this.'

vexx32 added a commit to vexx32/chocolatey-ansible that referenced this issue Jun 22, 2022
Rename some functions to use singular nouns per linting guidelines.
vexx32 added a commit to vexx32/chocolatey-ansible that referenced this issue Jun 22, 2022
Added a process block for `ConvertFrom-Stdout` which was missing it.
vexx32 added a commit to vexx32/chocolatey-ansible that referenced this issue Jun 22, 2022
Normalised the amount of whitespace used for hashtable declarations and
a few other cases.

Added suppression attributes around module specs due to their propensity
to become rather complicated, where the extra whitespace is generally
helpful for readability.
Also added suppression to the simpler module specs for consistency.
vexx32 added a commit to vexx32/chocolatey-ansible that referenced this issue Jun 22, 2022
Split up some error messages into separate lines to avoid this lint;
hopefully it makes them a bit easier to read in code as well.
vexx32 added a commit to vexx32/chocolatey-ansible that referenced this issue Jun 22, 2022
Linter in newer ansible versions (rightly) makes a fuss about possibly
unclear module names, so I've added the correct module prefixes to all
M() module references, and also to some `seealso` sections that
according to docs are supposed to use FQCN as well.
vexx32 added a commit to vexx32/chocolatey-ansible that referenced this issue Jun 22, 2022
Earlier attempt didn't seem to manage the suppression properly.
vexx32 added a commit to vexx32/chocolatey-ansible that referenced this issue Jun 22, 2022
vexx32 added a commit to vexx32/chocolatey-ansible that referenced this issue Jun 23, 2022
Normalised the amount of whitespace used for hashtable declarations and
a few other cases.

Added suppression attributes around module specs due to their propensity
to become rather complicated, where the extra whitespace is generally
helpful for readability.
Also added suppression to the simpler module specs for consistency.
vexx32 added a commit to vexx32/chocolatey-ansible that referenced this issue Jun 23, 2022
Split up some error messages into separate lines to avoid this lint;
hopefully it makes them a bit easier to read in code as well.
vexx32 added a commit to vexx32/chocolatey-ansible that referenced this issue Jun 23, 2022
Linter in newer ansible versions (rightly) makes a fuss about possibly
unclear module names, so I've added the correct module prefixes to all
M() module references, and also to some `seealso` sections that
according to docs are supposed to use FQCN as well.
vexx32 added a commit to vexx32/chocolatey-ansible that referenced this issue Jun 23, 2022
Windos added a commit that referenced this issue Jun 27, 2022
@vexx32 vexx32 added 4 - Done Code has been added to the repository, and has been reviewed by a team member and removed 0 - _Triaging Issue is accepted, but a milestone has yet to be added for the issue labels Jun 27, 2022
@vexx32 vexx32 added this to the 1.3.0 milestone Jun 29, 2022
@vexx32 vexx32 added 5 - Released The issue has been resolved, and released to the public for consumption and removed 4 - Done Code has been added to the repository, and has been reviewed by a team member labels Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Released The issue has been resolved, and released to the public for consumption Documentation Issues for changes that only need to change documentation Priority_LOW Issues that are low priority, and will most likely only be fixed by the community Tests Issues related to the tests (NUnit, xUnit, Pester, Etc)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants