From 501ccf04c1d3f2403df4d543c72fa0aa8c9a73cb Mon Sep 17 00:00:00 2001 From: Sebastien Vermeille Date: Tue, 20 Aug 2024 10:43:59 +0200 Subject: [PATCH 1/9] Try to fix sonar multiple maven module detection (currently it only detect one module) --- pom.xml | 2 +- stylesniffer-annotation-processor/pom.xml | 2 ++ stylesniffer-api/pom.xml | 4 +++- stylesniffer-impl/pom.xml | 2 ++ stylesniffer-testkit/pom.xml | 4 +++- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index eeda18d..8fa7187 100644 --- a/pom.xml +++ b/pom.xml @@ -56,7 +56,7 @@ ${project.sonar.root.projectKey} src/main/java src/test/java - https://cookiecode.dev/oss_projects/StyleSniffer + https://stylesniffer.cookiecode.dev/ https://github.com/sebastienvermeille/StyleSniffer diff --git a/stylesniffer-annotation-processor/pom.xml b/stylesniffer-annotation-processor/pom.xml index 2db3f88..a71eb6a 100644 --- a/stylesniffer-annotation-processor/pom.xml +++ b/stylesniffer-annotation-processor/pom.xml @@ -42,6 +42,8 @@ ${java.sdk.version} ${source.encoding} ${basedir}/.. + + ${project.sonar.root.projectKey}-${project.groupId}-${project.artifactId} diff --git a/stylesniffer-api/pom.xml b/stylesniffer-api/pom.xml index 97530f3..974ecce 100644 --- a/stylesniffer-api/pom.xml +++ b/stylesniffer-api/pom.xml @@ -42,6 +42,8 @@ ${java.sdk.version} ${source.encoding} ${basedir}/.. + + ${project.sonar.root.projectKey}-${project.groupId}-${project.artifactId} @@ -51,4 +53,4 @@ - \ No newline at end of file + diff --git a/stylesniffer-impl/pom.xml b/stylesniffer-impl/pom.xml index 0c8e096..cd3e98d 100644 --- a/stylesniffer-impl/pom.xml +++ b/stylesniffer-impl/pom.xml @@ -42,6 +42,8 @@ ${java.sdk.version} ${source.encoding} ${basedir}/.. + + ${project.sonar.root.projectKey}-${project.groupId}-${project.artifactId} diff --git a/stylesniffer-testkit/pom.xml b/stylesniffer-testkit/pom.xml index ab8b95d..64a467a 100644 --- a/stylesniffer-testkit/pom.xml +++ b/stylesniffer-testkit/pom.xml @@ -43,6 +43,8 @@ ${java.sdk.version} ${source.encoding} ${basedir}/.. + + ${project.sonar.root.projectKey}-${project.groupId}-${project.artifactId} @@ -63,4 +65,4 @@ - \ No newline at end of file + From 64837e4657bbeac2125b862e326fa2281c5bac75 Mon Sep 17 00:00:00 2001 From: Sebastien Vermeille Date: Tue, 20 Aug 2024 10:47:05 +0200 Subject: [PATCH 2/9] Make proper use of constants --- .../processor/RegisterCaseStyleAnnotationProcessor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stylesniffer-annotation-processor/src/main/java/dev/cookiecode/stylesniffer/annotation/processor/RegisterCaseStyleAnnotationProcessor.java b/stylesniffer-annotation-processor/src/main/java/dev/cookiecode/stylesniffer/annotation/processor/RegisterCaseStyleAnnotationProcessor.java index e05b76a..601ee96 100644 --- a/stylesniffer-annotation-processor/src/main/java/dev/cookiecode/stylesniffer/annotation/processor/RegisterCaseStyleAnnotationProcessor.java +++ b/stylesniffer-annotation-processor/src/main/java/dev/cookiecode/stylesniffer/annotation/processor/RegisterCaseStyleAnnotationProcessor.java @@ -78,13 +78,13 @@ public class RegisterCaseStyleAnnotationProcessor extends AbstractProcessor { private static final String TEMPLATE_VARIABLE_GENERATED_AT = "generatedAt"; private static final String TEMPLATE_FILE_NAME = "case_style_injector"; private static final String POINT = "."; - private final Class ANNOTATION_CLASS = RegisterCaseStyle.class; - private final Class IMPLEMENTED_INTERFACE_CLASS = CaseStyle.class; + private static final Class ANNOTATION_CLASS = RegisterCaseStyle.class; + private static final Class IMPLEMENTED_INTERFACE_CLASS = CaseStyle.class; @Override public boolean process( final Set annotations, final RoundEnvironment roundEnv) { - final var annotatedElements = roundEnv.getElementsAnnotatedWith(this.ANNOTATION_CLASS); + final var annotatedElements = roundEnv.getElementsAnnotatedWith(ANNOTATION_CLASS); if (!annotatedElements.isEmpty()) { this.generateCaseStyleInjector(annotatedElements); From 32fd852ea14f36a3a47addce990a40257b950a3c Mon Sep 17 00:00:00 2001 From: Sebastien Vermeille Date: Tue, 20 Aug 2024 10:51:49 +0200 Subject: [PATCH 3/9] Ignore sonar false positives These class generates tests they implement an interface --- .../dev/cookiecode/stylesniffer/impl/KebabCaseStyleTest.java | 1 + .../cookiecode/stylesniffer/impl/LowerCamelCaseStyleTest.java | 1 + .../dev/cookiecode/stylesniffer/impl/PascalCaseStyleTest.java | 1 + .../stylesniffer/impl/ScreamingSnakeCaseStyleTest.java | 1 + .../dev/cookiecode/stylesniffer/impl/SnakeCaseStyleTest.java | 1 + 5 files changed, 5 insertions(+) diff --git a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/KebabCaseStyleTest.java b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/KebabCaseStyleTest.java index 2885ab2..5462045 100644 --- a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/KebabCaseStyleTest.java +++ b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/KebabCaseStyleTest.java @@ -32,6 +32,7 @@ * * @author Sebastien Vermeille */ +@SuppressWarnings("java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test class KebabCaseStyleTest implements BaseCaseStyleTest { @Override diff --git a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/LowerCamelCaseStyleTest.java b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/LowerCamelCaseStyleTest.java index 6359fec..c2ac1a7 100644 --- a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/LowerCamelCaseStyleTest.java +++ b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/LowerCamelCaseStyleTest.java @@ -32,6 +32,7 @@ * * @author Sebastien Vermeille */ +@SuppressWarnings("java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test class LowerCamelCaseStyleTest implements BaseCaseStyleTest { @Override diff --git a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/PascalCaseStyleTest.java b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/PascalCaseStyleTest.java index 668c95a..35aa27f 100644 --- a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/PascalCaseStyleTest.java +++ b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/PascalCaseStyleTest.java @@ -32,6 +32,7 @@ * * @author Sebastien Vermeille */ +@SuppressWarnings("java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test class PascalCaseStyleTest implements BaseCaseStyleTest { @Override diff --git a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/ScreamingSnakeCaseStyleTest.java b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/ScreamingSnakeCaseStyleTest.java index 66f0630..4f1b895 100644 --- a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/ScreamingSnakeCaseStyleTest.java +++ b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/ScreamingSnakeCaseStyleTest.java @@ -32,6 +32,7 @@ * * @author Sebastien Vermeille */ +@SuppressWarnings("java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test class ScreamingSnakeCaseStyleTest implements BaseCaseStyleTest { @Override diff --git a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/SnakeCaseStyleTest.java b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/SnakeCaseStyleTest.java index ea1b759..7d7f30f 100644 --- a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/SnakeCaseStyleTest.java +++ b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/SnakeCaseStyleTest.java @@ -30,6 +30,7 @@ * * @author Sebastien Vermeille */ +@SuppressWarnings("java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test class SnakeCaseStyleTest implements BaseCaseStyleTest { @Override From 0ed8b368816584ac71157fa80ff957a6aa53bb19 Mon Sep 17 00:00:00 2001 From: Sebastien Vermeille Date: Tue, 20 Aug 2024 12:29:26 +0200 Subject: [PATCH 4/9] Remove TODO --- .../dev/cookiecode/stylesniffer/impl/SnakeCaseStyle.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/stylesniffer-impl/src/main/java/dev/cookiecode/stylesniffer/impl/SnakeCaseStyle.java b/stylesniffer-impl/src/main/java/dev/cookiecode/stylesniffer/impl/SnakeCaseStyle.java index f7530c8..1fae7cc 100644 --- a/stylesniffer-impl/src/main/java/dev/cookiecode/stylesniffer/impl/SnakeCaseStyle.java +++ b/stylesniffer-impl/src/main/java/dev/cookiecode/stylesniffer/impl/SnakeCaseStyle.java @@ -71,11 +71,7 @@ public Set getVariantNames() { * @param name the name to check * @return {@code true} if the name is in snake_case, {@code false} otherwise */ - private boolean isSnakeCase( - @NonNull - final String - name) { // TODO: consider creating an annotation @NonEmpty to indicate its handled - // upfront + private boolean isSnakeCase(@NonNull final String name) { // Check if the name is all lowercase and contains underscores boolean hasUnderscore = false; for (int i = 0; i < name.length(); i++) { From e3cccf94541a99d47246cd00f63d01b6b31890a4 Mon Sep 17 00:00:00 2001 From: Sebastien Vermeille Date: Tue, 20 Aug 2024 12:32:22 +0200 Subject: [PATCH 5/9] Remove TODO --- .../dev/cookiecode/stylesniffer/impl/KebabCaseStyleTest.java | 3 ++- .../cookiecode/stylesniffer/impl/LowerCamelCaseStyleTest.java | 3 ++- .../dev/cookiecode/stylesniffer/impl/PascalCaseStyleTest.java | 3 ++- .../stylesniffer/impl/ScreamingSnakeCaseStyleTest.java | 3 ++- .../dev/cookiecode/stylesniffer/impl/SnakeCaseStyleTest.java | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/KebabCaseStyleTest.java b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/KebabCaseStyleTest.java index 5462045..f5bac9e 100644 --- a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/KebabCaseStyleTest.java +++ b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/KebabCaseStyleTest.java @@ -32,7 +32,8 @@ * * @author Sebastien Vermeille */ -@SuppressWarnings("java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test +@SuppressWarnings( + "java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test class KebabCaseStyleTest implements BaseCaseStyleTest { @Override diff --git a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/LowerCamelCaseStyleTest.java b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/LowerCamelCaseStyleTest.java index c2ac1a7..7c7c444 100644 --- a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/LowerCamelCaseStyleTest.java +++ b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/LowerCamelCaseStyleTest.java @@ -32,7 +32,8 @@ * * @author Sebastien Vermeille */ -@SuppressWarnings("java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test +@SuppressWarnings( + "java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test class LowerCamelCaseStyleTest implements BaseCaseStyleTest { @Override diff --git a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/PascalCaseStyleTest.java b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/PascalCaseStyleTest.java index 35aa27f..45e17e7 100644 --- a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/PascalCaseStyleTest.java +++ b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/PascalCaseStyleTest.java @@ -32,7 +32,8 @@ * * @author Sebastien Vermeille */ -@SuppressWarnings("java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test +@SuppressWarnings( + "java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test class PascalCaseStyleTest implements BaseCaseStyleTest { @Override diff --git a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/ScreamingSnakeCaseStyleTest.java b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/ScreamingSnakeCaseStyleTest.java index 4f1b895..1a2953a 100644 --- a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/ScreamingSnakeCaseStyleTest.java +++ b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/ScreamingSnakeCaseStyleTest.java @@ -32,7 +32,8 @@ * * @author Sebastien Vermeille */ -@SuppressWarnings("java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test +@SuppressWarnings( + "java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test class ScreamingSnakeCaseStyleTest implements BaseCaseStyleTest { @Override diff --git a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/SnakeCaseStyleTest.java b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/SnakeCaseStyleTest.java index 7d7f30f..cc34351 100644 --- a/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/SnakeCaseStyleTest.java +++ b/stylesniffer-impl/src/test/java/dev/cookiecode/stylesniffer/impl/SnakeCaseStyleTest.java @@ -30,7 +30,8 @@ * * @author Sebastien Vermeille */ -@SuppressWarnings("java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test +@SuppressWarnings( + "java:S2187") // sonar is not able to detect that BaseCaseStyleTest interface generates test class SnakeCaseStyleTest implements BaseCaseStyleTest { @Override From 6fc2518371b6930e52a0ab367466dc03b873a5e3 Mon Sep 17 00:00:00 2001 From: Sebastien Vermeille Date: Tue, 20 Aug 2024 12:35:51 +0200 Subject: [PATCH 6/9] Cleanup --- .../processor/RegisterCaseStyleAnnotationProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stylesniffer-annotation-processor/src/main/java/dev/cookiecode/stylesniffer/annotation/processor/RegisterCaseStyleAnnotationProcessor.java b/stylesniffer-annotation-processor/src/main/java/dev/cookiecode/stylesniffer/annotation/processor/RegisterCaseStyleAnnotationProcessor.java index 601ee96..8f2ec46 100644 --- a/stylesniffer-annotation-processor/src/main/java/dev/cookiecode/stylesniffer/annotation/processor/RegisterCaseStyleAnnotationProcessor.java +++ b/stylesniffer-annotation-processor/src/main/java/dev/cookiecode/stylesniffer/annotation/processor/RegisterCaseStyleAnnotationProcessor.java @@ -127,7 +127,7 @@ private Context prepareTemplateContext(final Set elements) { Generated.class.getCanonicalName(), List.class.getCanonicalName(), ArrayList.class.getCanonicalName(), - this.IMPLEMENTED_INTERFACE_CLASS.getCanonicalName()); + IMPLEMENTED_INTERFACE_CLASS.getCanonicalName()); context.setVariable(TEMPLATE_VARIABLE_IMPORTS, imports.stream().sorted().collect(toList())); context.setVariable(TEMPLATE_VARIABLE_CLASS_NAME, GENERATED_CLASS_NAME); From 1be6362e3a5b76fdac4c9b4628d30a0453e22097 Mon Sep 17 00:00:00 2001 From: Sebastien Vermeille Date: Tue, 20 Aug 2024 12:48:04 +0200 Subject: [PATCH 7/9] Cleanup --- .../processor/RegisterCaseStyleAnnotationProcessor.java | 5 ++--- .../dev/cookiecode/stylesniffer/impl/PascalCaseStyle.java | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/stylesniffer-annotation-processor/src/main/java/dev/cookiecode/stylesniffer/annotation/processor/RegisterCaseStyleAnnotationProcessor.java b/stylesniffer-annotation-processor/src/main/java/dev/cookiecode/stylesniffer/annotation/processor/RegisterCaseStyleAnnotationProcessor.java index 8f2ec46..bcb7b1e 100644 --- a/stylesniffer-annotation-processor/src/main/java/dev/cookiecode/stylesniffer/annotation/processor/RegisterCaseStyleAnnotationProcessor.java +++ b/stylesniffer-annotation-processor/src/main/java/dev/cookiecode/stylesniffer/annotation/processor/RegisterCaseStyleAnnotationProcessor.java @@ -25,7 +25,6 @@ import static java.time.LocalDateTime.now; import static java.time.ZoneOffset.UTC; import static java.time.format.DateTimeFormatter.ISO_LOCAL_DATE_TIME; -import static java.util.stream.Collectors.toList; import dev.cookiecode.stylesniffer.annotation.RegisterCaseStyle; import dev.cookiecode.stylesniffer.api.CaseStyle; @@ -128,13 +127,13 @@ private Context prepareTemplateContext(final Set elements) { List.class.getCanonicalName(), ArrayList.class.getCanonicalName(), IMPLEMENTED_INTERFACE_CLASS.getCanonicalName()); - context.setVariable(TEMPLATE_VARIABLE_IMPORTS, imports.stream().sorted().collect(toList())); + context.setVariable(TEMPLATE_VARIABLE_IMPORTS, imports.stream().sorted().toList()); context.setVariable(TEMPLATE_VARIABLE_CLASS_NAME, GENERATED_CLASS_NAME); final var classesList = elements.stream() .map(element -> ((TypeElement) element).getQualifiedName().toString()) - .collect(toList()); + .toList(); context.setVariable(TEMPLATE_VARIABLE_ELEMENTS, classesList); diff --git a/stylesniffer-impl/src/main/java/dev/cookiecode/stylesniffer/impl/PascalCaseStyle.java b/stylesniffer-impl/src/main/java/dev/cookiecode/stylesniffer/impl/PascalCaseStyle.java index 07d9e5c..92b9800 100644 --- a/stylesniffer-impl/src/main/java/dev/cookiecode/stylesniffer/impl/PascalCaseStyle.java +++ b/stylesniffer-impl/src/main/java/dev/cookiecode/stylesniffer/impl/PascalCaseStyle.java @@ -87,7 +87,7 @@ private boolean isPascalCase(@NonNull final String name) { if (seenLowercase && isUpperCase(previousChar)) { continue; } - if (!seenLowercase || (seenLowercase && isLowerCase(previousChar))) { + if (!seenLowercase || isLowerCase(previousChar)) { continue; } } From da550f49c7c688e9c0769695572da9df218ce8c2 Mon Sep 17 00:00:00 2001 From: Sebastien Vermeille Date: Tue, 20 Aug 2024 12:50:41 +0200 Subject: [PATCH 8/9] Cleanup --- .../stylesniffer/api/exception/StyleSnifferException.java | 7 +++++++ .../java/dev/cookiecode/stylesniffer/StyleSniffer.java | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 stylesniffer-api/src/main/java/dev/cookiecode/stylesniffer/api/exception/StyleSnifferException.java diff --git a/stylesniffer-api/src/main/java/dev/cookiecode/stylesniffer/api/exception/StyleSnifferException.java b/stylesniffer-api/src/main/java/dev/cookiecode/stylesniffer/api/exception/StyleSnifferException.java new file mode 100644 index 0000000..fdd6563 --- /dev/null +++ b/stylesniffer-api/src/main/java/dev/cookiecode/stylesniffer/api/exception/StyleSnifferException.java @@ -0,0 +1,7 @@ +package dev.cookiecode.stylesniffer.api.exception; + +import lombok.experimental.StandardException; + +@StandardException +public class StyleSnifferException extends RuntimeException { +} diff --git a/stylesniffer-impl/src/main/java/dev/cookiecode/stylesniffer/StyleSniffer.java b/stylesniffer-impl/src/main/java/dev/cookiecode/stylesniffer/StyleSniffer.java index cfc7c64..54ea600 100644 --- a/stylesniffer-impl/src/main/java/dev/cookiecode/stylesniffer/StyleSniffer.java +++ b/stylesniffer-impl/src/main/java/dev/cookiecode/stylesniffer/StyleSniffer.java @@ -26,6 +26,7 @@ import static java.util.stream.Collectors.toSet; import dev.cookiecode.stylesniffer.api.CaseStyle; +import dev.cookiecode.stylesniffer.api.exception.StyleSnifferException; import dev.cookiecode.stylesniffer.generated.CaseStyleInjector; import java.util.ArrayList; import java.util.List; @@ -60,7 +61,7 @@ public class StyleSniffer { try { this.registerAllAnnotatedCaseStyles(); } catch (final Exception e) { - throw new RuntimeException("Failed to initialize CaseStyleRecognizer", e); + throw new StyleSnifferException("Failed to initialize CaseStyleRecognizer", e); } } @@ -82,7 +83,7 @@ private void registerAllAnnotatedCaseStyles() { try { this.caseStyles.add(clazz.getDeclaredConstructor().newInstance()); } catch (final Exception e) { - throw new RuntimeException( + throw new StyleSnifferException( String.format("Failed to instantiate case style: %s", clazz.getName()), e); } } From e62cf88c723d7b677c5b2937fe9f60ae2070a2f8 Mon Sep 17 00:00:00 2001 From: Sebastien Vermeille Date: Tue, 20 Aug 2024 12:51:14 +0200 Subject: [PATCH 9/9] Cleanup --- .../api/exception/StyleSnifferException.java | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/stylesniffer-api/src/main/java/dev/cookiecode/stylesniffer/api/exception/StyleSnifferException.java b/stylesniffer-api/src/main/java/dev/cookiecode/stylesniffer/api/exception/StyleSnifferException.java index fdd6563..d6fc1d5 100644 --- a/stylesniffer-api/src/main/java/dev/cookiecode/stylesniffer/api/exception/StyleSnifferException.java +++ b/stylesniffer-api/src/main/java/dev/cookiecode/stylesniffer/api/exception/StyleSnifferException.java @@ -1,7 +1,31 @@ +/* + * The MIT License + * Copyright © 2024 Sebastien Vermeille + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package dev.cookiecode.stylesniffer.api.exception; import lombok.experimental.StandardException; +/** + * @author Sebastien Vermeille + */ @StandardException -public class StyleSnifferException extends RuntimeException { -} +public class StyleSnifferException extends RuntimeException {}