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

chore(checkstyle): bumped checkstyle version to 10.15.0 #392

Merged
merged 11 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
28 changes: 15 additions & 13 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
-->

<module name = "Checker">
<module name="Checker">
<property name="charset" value="UTF-8"/>

<property name="severity" value="warning"/>

<property name="fileExtensions" value="java, properties, xml"/>

<module name="SuppressWarningsFilter"/>
<module name="SuppressionFilter">
<property name="file" value="${config_loc}/checkstyle-excludes.xml" />
<property name="file" value="${config_loc}/checkstyle-excludes.xml"/>
</module>

<!-- Excludes all 'module-info.java' files -->
Expand All @@ -44,14 +45,15 @@
</module>

<module name="RegexpSingleline">
<property name="format" value="^\s*\*\s*@author" />
<property name="minimum" value="0" />
<property name="maximum" value="0" />
<property name="message" value="Javadoc has illegal ''author'' tag." />
<property name="fileExtensions" value="java" />
<property name="format" value="^\s*\*\s*@author"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Javadoc has illegal ''author'' tag."/>
<property name="fileExtensions" value="java"/>
</module>

<module name="TreeWalker">
<module name="SuppressWarningsHolder"/>
<module name="OuterTypeFilename"/>
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
Expand Down Expand Up @@ -154,7 +156,7 @@
value="Type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MemberName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
<property name="format" value="(^[a-z]([a-zA-Z0-9]*)?$)|^x$|^y$|^z$"/>
<message key="name.invalidPattern"
value="Member name ''{0}'' must match pattern ''{1}''."/>
</module>
Expand All @@ -175,7 +177,7 @@
</module>
<module name="LocalVariableName">
<property name="tokens" value="VARIABLE_DEF"/>
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<property name="format" value="(^[a-z]([a-zA-Z0-9]*)?$)|^x$|^y$|^z$"/>
<message key="name.invalidPattern"
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
</module>
Expand Down Expand Up @@ -216,7 +218,7 @@
<module name="AbbreviationAsWordInName">
<property name="ignoreFinal" value="false"/>
<property name="allowedAbbreviationLength" value="1"/>
<property name="allowedAbbreviations" value="CAM,IVIM,SPATM,DENM" />
<property name="allowedAbbreviations" value="CAM,IVIM,SPATM,DENM,SQL,CMD"/>
</module>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="VariableDeclarationUsageDistance"/>
Expand Down Expand Up @@ -263,17 +265,17 @@
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="accessModifiers" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="validateThrows" value="true"/>
<property name="validateThrows" value="false"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test, Deprecated"/>
</module>
<module name="MissingJavadocMethod">
<property name="scope" value="public"/>
<property name="minLineCount" value="3"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="ignoreMethodNamesRegex" value="^get.*$|^with.*$|^set.*$|^is.*$|"/>
<property name="ignoreMethodNamesRegex" value="^get.*$|^with.*$|^set.*$|^is.*$|^add.*$"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public final String getId() {
*
* @param event the event to process.
* @return true if this method has processed the given event
* @throws RuntimeException if {@link Event} could not be properly handled by the processor
*/
public final boolean preProcessEvent(final Event event) {
final Object resource = event.getResource();
Expand Down Expand Up @@ -501,10 +502,6 @@ public final File getConfigurationPath() {
return SimulationKernel.SimulationKernel.getConfigurationPath();
}

public boolean canProcessEvent() {
return true;
}

@Override
public String getGroup() {
return group;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*
* Contact: [email protected]
*/

package org.eclipse.mosaic.fed.sumo.bridge;


Expand Down Expand Up @@ -45,6 +46,12 @@ public class LibSumoBridge implements Bridge {
private final RouteFacade routeControl;
private final PoiFacade poiControl;

/**
* Constructor for the {@link LibSumoBridge}, initializing simulation and facades based on configuration.
*
* @param sumoConfiguration the MOSAIC internal {@link CSumo SUMO configuration}
* @param parameters the program arguments for starting the simulation
*/
public LibSumoBridge(CSumo sumoConfiguration, List<String> parameters) {

Simulation.load(new StringVector(parameters));
Expand Down
Loading
Loading