jQAssistant HCL Plugin

Parent POM for jQAssistant for contrib projects.

License

License

Categories

Categories

Ant Build Tools jQAssistant Application Testing & Monitoring Code Analysis
GroupId

GroupId

org.jqassistant.contrib.plugin
ArtifactId

ArtifactId

jqassistant-hcl-plugin
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

jQAssistant HCL Plugin
Parent POM for jQAssistant for contrib projects.
Project URL

Project URL

https://github.com/jqassistant-contrib/jqassistant-hcl-plugin
Project Organization

Project Organization

jQAssistant
Source Code Management

Source Code Management

https://github.com/jqassistant-contrib/jqassistant-hcl-plugin

Download jqassistant-hcl-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/org.jqassistant.contrib.plugin/jqassistant-hcl-plugin/ -->
<dependency>
    <groupId>org.jqassistant.contrib.plugin</groupId>
    <artifactId>jqassistant-hcl-plugin</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.jqassistant.contrib.plugin/jqassistant-hcl-plugin/
implementation 'org.jqassistant.contrib.plugin:jqassistant-hcl-plugin:0.1.0'
// https://jarcasting.com/artifacts/org.jqassistant.contrib.plugin/jqassistant-hcl-plugin/
implementation ("org.jqassistant.contrib.plugin:jqassistant-hcl-plugin:0.1.0")
'org.jqassistant.contrib.plugin:jqassistant-hcl-plugin:jar:0.1.0'
<dependency org="org.jqassistant.contrib.plugin" name="jqassistant-hcl-plugin" rev="0.1.0">
  <artifact name="jqassistant-hcl-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.jqassistant.contrib.plugin', module='jqassistant-hcl-plugin', version='0.1.0')
)
libraryDependencies += "org.jqassistant.contrib.plugin" % "jqassistant-hcl-plugin" % "0.1.0"
[org.jqassistant.contrib.plugin/jqassistant-hcl-plugin "0.1.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.antlr : antlr4-runtime jar 4.8-1
org.slf4j : slf4j-log4j12 jar 1.7.28
com.google.guava : guava jar 29.0-jre

provided (2)

Group / Artifact Type Version
com.buschmais.jqassistant.core : scanner jar
com.buschmais.jqassistant.plugin : common jar

test (8)

Group / Artifact Type Version
com.buschmais.jqassistant.core : plugin jar
com.buschmais.jqassistant.neo4jserver : neo4jv3 jar 1.8.0
com.buschmais.jqassistant.plugin : common test-jar 1.8.0
org.junit.jupiter : junit-jupiter-engine jar 5.5.1
org.assertj : assertj-core jar 3.11.1
org.slf4j : slf4j-simple jar 1.7.25
junit : junit jar 4.13
org.mockito : mockito-core jar 2.24.0

Project Modules

There are no modules declared in this project.

jQAssistant HCL Plugin

This project provides a jQAssistant plugin to analyze HCL language.

Usage

Prerequisites

  • Java 8 or higher

  • Maven 3.2.5 or higher

  • jQAssistant 1.8.0 or higher (see below)

Setup

The plugin can be enabled in Maven based project by adding it as a dependency to the jQAssistant Maven plugin:

pom.xml
<build>
    <plugins>
        <plugin>
            <groupId>com.buschmais.jqassistant</groupId>
            <artifactId>jqassistant-maven-plugin</artifactId>
            <version>${jqassistant.version}</version>
            <executions>
                <execution>
                    <id>default-cli</id>
                    <goals>
                        <goal>scan</goal>
                        <goal>analyze</goal>
                    </goals>
                    <configuration>
                        <concepts>
                            <concept>hcl:RootModule</concept>                               <!--(1)-->
                        </concepts>
                        <groups>
                            <group>hcl:Naming</group>
                            <group>hcl:Bugs</group>
                        </groups>
                    </configuration>
                </execution>
            </executions>
            <dependencies>
                <dependency>                                                                <!--(2)-->
                    <groupId>org.jqassistant.contrib.plugin</groupId>
                    <artifactId>jqassistant-hcl-plugin</artifactId>
                    <version>0.1.0</version>
                </dependency>
                <dependency>                                                                <!--(3)-->
                    <groupId>my.company</groupId>
                    <artifactId>my.rule.plugin</artifactId>
                    <version>1.0.0-SNAPSHOT</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>
  1. Configure wanted concepts of the plugin.

  2. Declares the plugin as dependency of jQAssistant

  3. Add your company rules for terraform as a jQAssistant plugin (if needed)

HCL Grammar

Download the grammar and put the file into src/main/antlr4/prg/jqassistant/contrib/plugin/hcl/grammar/

Concepts to apply to Terraform files

hcl:RootModule

Identifies the root module. Makes further analysis simpler.

Rules/Contraint to apply to Terraform files

hcl:Naming

  • validates object names

  • ensures that input, output and local variables are defined in separate files

hcl:Bugs

Rules which prohibit the use of some terraform directives as they do not work.

Feedback

Please report any issues.

Acknowledgements

This plugin could not provide its functionality without the support of the following open source projects:

org.jqassistant.contrib.plugin

jQAssistant Contribution

A place for contributions to jQAssistant, e.g. plugins, tool integrations etc.

Versions

Version
0.1.0