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

Improve documentation #1359

Merged
merged 3 commits into from
Feb 28, 2020
Merged

Improve documentation #1359

merged 3 commits into from
Feb 28, 2020

Conversation

miparnisari
Copy link
Contributor

Issue #, if available: #903

Description of changes:

  • Fixes typos
  • Adds instructions on how to setup development environment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@miparnisari miparnisari changed the title Docs Improve documentation Feb 17, 2020

```bash
pip install tox # or "pip3 install tox"
tox -e py37
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kddejong Are there any instructions on how to debug tests? I wasn't able to get a configuration for this on VS Code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me try it out again.... I'm pretty sure I got it working at one point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to run & debug the tests on PyCharm by right-clicking the tox.ini file and clicking Run & Debug

@kddejong kddejong merged commit 2ef69ec into aws-cloudformation:master Feb 28, 2020
@PatMyron
Copy link
Contributor

PatMyron commented Mar 5, 2020

At least one of these properties must be specified:
https://github.com/aws-cloudformation/cfn-python-lint/blob/b788cc9bd3d49ed20d5f2e58602755a0ef37f52c/src/cfnlint/data/AdditionalSpecs/AtLeastOne.json#L20-L25

Only one of these properties may be specified:
https://github.com/aws-cloudformation/cfn-python-lint/blob/b788cc9bd3d49ed20d5f2e58602755a0ef37f52c/src/cfnlint/data/AdditionalSpecs/OnlyOne.json#L79-L84

If this property (SnapshotIdentifier) is specified, these properties must be excluded:
https://github.com/aws-cloudformation/cfn-python-lint/blob/b788cc9bd3d49ed20d5f2e58602755a0ef37f52c/src/cfnlint/data/AdditionalSpecs/Exclusive.json#L102-L107

If this property (VpcId) is specified, these properties must be included:
https://github.com/aws-cloudformation/cfn-python-lint/blob/b788cc9bd3d49ed20d5f2e58602755a0ef37f52c/src/cfnlint/data/AdditionalSpecs/Inclusive.json#L48-L52


Allowed patterns:
https://github.com/aws-cloudformation/cfn-python-lint/blob/a46773c752247c51effef415bd3462eaec10ab0b/src/cfnlint/data/ExtendedSpecs/all/03_value_types.json#L33-L36

Allowed values:
https://github.com/aws-cloudformation/cfn-python-lint/blob/6cce9222c89056f1546f6fee068ce6dc9dfa394e/src/cfnlint/data/ExtendedSpecs/all/03_value_types/aws_codebuild.json#L2-L11

List size constraints:
https://github.com/aws-cloudformation/cfn-python-lint/blob/6cce9222c89056f1546f6fee068ce6dc9dfa394e/src/cfnlint/data/ExtendedSpecs/all/03_value_types/aws_iam.json#L71-L78

Number size constraints:
https://github.com/aws-cloudformation/cfn-python-lint/blob/df8d065380e49e53dad9513dab41c2438e105f43/src/cfnlint/data/ExtendedSpecs/all/03_value_types/aws_sqs.json#L17-L24

String size constraints:
https://github.com/aws-cloudformation/cfn-python-lint/blob/67fc5bb210b020e3226261f966a01726d574475d/src/cfnlint/data/ExtendedSpecs/all/03_value_types/aws_logs.json#L2-L9


There should be no functional difference, but src/cfnlint/data/ExtendedSpecs/all/03_value_types and src/cfnlint/data/ExtendedSpecs/all/04_property_values are more organized than src/cfnlint/data/ExtendedSpecs/all/03_value_types.json and src/cfnlint/data/ExtendedSpecs/all/04_property_values.json, so they should be preferred locations for new constraints


After editing these files, the rest of the necessary changes should be auto-generatable by running:

cfn-python-lint $ pip3 install -e . --user
cfn-python-lint $ cfn-lint --update-specs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants