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

feat: cloudformation linter #4081

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

miparnisari
Copy link

Revive #1715. It needs to be brought up to date.

Types of changes

  • Bug fix
  • New feature (non-breaking change which adds functionality)

Description

Add CloudFormation linter. Among other things, it provides:

  • instance type and resource type regional availability
  • IAM action validation
  • conditionally required properties and constraints for properties
  • warning about approaching template limits
  • best practices like properties that shouldn't be hardcoded and resource types that should have DeletionPolicy / UpdateReplacePolicy

How this PR works: it's a file annotator. If the file currently open isn't recognized as a CloudFormation template, it doesn't do anything. Otherwise, it tries to run the template through cfn-lint (a Python package). If errors are found, they are displayed inline.

Motivation and Context

There are plugins out there that do this same thing, e.g. https://github.com/binxio/cfn-lint-plugin. I would like to have this functionality within the official AWS plugin.

Related Issue(s)

N/A

Testing

Tested on Mac OS with IntelliJ Ultimate 2020 and on Windows 10.

Screenshot

image

image

Checklist

  • I have read the README document
  • I have read the CONTRIBUTING document
  • Local run of gradlew check succeeds
  • My code follows the code style of this project
  • I have added tests to cover my changes
  • All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

Maria Ines Parnisari and others added 23 commits April 18, 2020 19:22
Co-Authored-By: Pat Myron <PatMyron@users.noreply.github.com>
…ation-linter

# Conflicts:
#	resources/resources/software/aws/toolkits/resources/localized_messages.properties
…i/aws-toolkit-jetbrains into feature-cloudformation-linter
…ation-linter

# Conflicts:
#	jetbrains-core/resources/META-INF/plugin.xml
#	jetbrains-core/src/software/aws/toolkits/jetbrains/core/help/HelpIds.kt
#	jetbrains-core/src/software/aws/toolkits/jetbrains/settings/AwsSettingsConfigurable.java
@miparnisari miparnisari requested a review from a team as a code owner December 23, 2023 07:19
@miparnisari miparnisari force-pushed the feature-cloudformation-linter-v2 branch from 298662a to 3cca60a Compare December 23, 2023 07:20
Copy link

sonarcloud bot commented Dec 23, 2023

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@miparnisari miparnisari changed the title Feature cloudformation linter v2 feat: cloudformation linter Dec 23, 2023
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.

None yet

1 participant