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

Enable Checkstyle fail on error / violation for Key Vault #2969

Merged
merged 5 commits into from
Mar 6, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .azure-pipelines/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,24 @@ jobs:
JavaVersion: '1.11'

steps:
- task: Maven@3
# This build task can be removed once we start publishing the build tools to Maven Central
JonathanGiles marked this conversation as resolved.
Show resolved Hide resolved
displayName: 'Install reporting tools'
inputs:
mavenPomFile: $(pomFile)
options: '$(DefaultOptions) -Dinclude-non-shipping-modules -DskipTests -Dgpg.skip'
mavenOptions: '$(LoggingOptions)'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'
publishJUnitResults: false
goals: 'install'

- task: Maven@3
displayName: 'Build and Package'
inputs:
mavenPomFile: $(pomFile)
goals: 'javadoc:jar source:jar package'
goals: 'checkstyle:check javadoc:jar source:jar package' # Run checkstyle:check to fail build when checkstyle failures are encountered
options: '$(DefaultOptions) $(ProfileFlag) -Dmaven.test.skip=true -Dinclude-template' # We include template-module so we ensure it always builds in CI
mavenOptions: '$(LoggingOptions)'
javaHomeOption: 'JDKVersion'
Expand Down
11 changes: 11 additions & 0 deletions keyvault/data-plane/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@
</configuration>
</plugin>

<!-- Now that all checkstyle issues have been resolved, override the
default behavior to make checkstyle fail on error and violation. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<failsOnError>true</failsOnError>
<failOnViolation>true</failOnViolation>
</configuration>
</plugin>

</plugins>

</build>
Expand Down