Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
385cc9f
add linting job for csharp
SandyEma9 Jan 20, 2023
8a95ff8
add linting job for csharp
SandyEma9 Jan 20, 2023
eab4f90
try lint
SandyEma9 Jan 20, 2023
bc4c1c0
try lint
SandyEma9 Jan 20, 2023
1c6af1e
try dotnet-format
SandyEma9 Jan 23, 2023
b658cc4
try dotnet-format
SandyEma9 Jan 23, 2023
03798d8
try clang-format
SandyEma9 Jan 24, 2023
4b77972
try clang-format
SandyEma9 Jan 24, 2023
86e0597
try dotnet-format
SandyEma9 Jan 24, 2023
e93e10d
try dotnet-format
SandyEma9 Jan 24, 2023
2eb3c92
try clang-format
SandyEma9 Jan 25, 2023
f13d4b2
change order in steps
SandyEma9 Jan 25, 2023
af3d1b6
try clang-format
SandyEma9 Jan 25, 2023
7de6b05
change order in steps
SandyEma9 Jan 25, 2023
d3419eb
try dotnet-format
SandyEma9 Jan 25, 2023
402c415
change order in steps
SandyEma9 Jan 25, 2023
5d4f81d
resolve error
SandyEma9 Jan 25, 2023
ebed43e
try just lintC#
SandyEma9 Jan 25, 2023
6f00496
try just lintC#
SandyEma9 Jan 25, 2023
99f8842
try just lintC#
SandyEma9 Jan 25, 2023
12cd357
try clang-format
SandyEma9 Jan 25, 2023
0a65e6a
try clang-format with error
SandyEma9 Jan 25, 2023
5846673
try clang-format with error
SandyEma9 Jan 25, 2023
6d422c6
try lint code base with error
SandyEma9 Jan 25, 2023
e74c173
try lint code base without error
SandyEma9 Jan 25, 2023
81a17b9
try lint code base with error
SandyEma9 Jan 25, 2023
328e62f
ignore master
SandyEma9 Jan 25, 2023
1aeb313
try lint code base without error
SandyEma9 Jan 26, 2023
3c53d09
try lint code base without error and EOF=LF
SandyEma9 Jan 26, 2023
c89d450
resolve cs errors
SandyEma9 Jan 26, 2023
dc818dc
try lint code base without error and EOF=LF
SandyEma9 Jan 27, 2023
657c949
change validate all code to false
SandyEma9 Jan 27, 2023
1df6b1e
try with c# error
SandyEma9 Jan 27, 2023
ef918c6
try with c# error
SandyEma9 Jan 27, 2023
eda4ee6
try v3.14.0 for lint
SandyEma9 Feb 2, 2023
b923302
back to v4 version
SandyEma9 Feb 2, 2023
6ae158a
try to reduce java errors
SandyEma9 Feb 2, 2023
5d0c72d
try VALIDATE_ALL_CODEBASE: false
SandyEma9 Feb 2, 2023
5cfe6c7
try VALIDATE_ALL_CODEBASE: false with java error
SandyEma9 Feb 2, 2023
34b30e4
try with java error
SandyEma9 Feb 3, 2023
47332ae
try dotnet format
SandyEma9 Feb 3, 2023
cf38e34
try dotnet format with error
SandyEma9 Feb 3, 2023
569f23d
try dotnet format with error
SandyEma9 Feb 3, 2023
bbf6530
Merge develop
robert-altom Mar 2, 2023
fd4a6d7
Add lint job
robert-altom Mar 2, 2023
ce64744
Fix issues
robert-altom Mar 3, 2023
658e6f9
Update push.yml
robert-altom Mar 3, 2023
9df0859
Update push.yml
robert-altom Mar 3, 2023
ce780b1
Add confings for Java and Python linters
robert-altom Mar 3, 2023
2f94cb8
Update push.yml
robert-altom Mar 4, 2023
0033aa7
Merge development
robert-altom Mar 5, 2023
696c7b3
Ignore JavaDocs checks
robert-altom Mar 5, 2023
844617e
Ignore JavaDocs checks
robert-altom Mar 5, 2023
b55f5a9
Ignore JavaDocs checks
robert-altom Mar 5, 2023
8c28fd8
Ignore JavaDocs checks
robert-altom Mar 5, 2023
6ab8572
Ignore JavaDocs checks
robert-altom Mar 5, 2023
27dff75
Fix Java lint issues
robert-altom Mar 5, 2023
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[*]
charset=utf-8
end_of_line=crlf
end_of_line=lf
trim_trailing_whitespace=false
insert_final_newline=false
indent_style=space
Expand Down
6 changes: 6 additions & 0 deletions .github/linters/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
max-line-length = 120

per-file-ignores =
*/__init__.py:F401,F403
*/keycode.py:E741
190 changes: 190 additions & 0 deletions .github/linters/sun_checks.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">

<!--
Checkstyle configuration that checks the sun coding conventions from:
- the Java Language Specification at
https://docs.oracle.com/javase/specs/jls/se11/html/index.html
- the Sun Code Conventions at https://www.oracle.com/java/technologies/javase/codeconventions-contents.html
- the Javadoc guidelines at
https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html
- the JDK Api documentation https://docs.oracle.com/en/java/javase/11/
- some best practices
Checkstyle is very configurable. Be sure to read the documentation at
https://checkstyle.org (or in your downloaded distribution).
Most Checks are configurable, be sure to consult the documentation.
To completely disable a check, just comment it out or delete it from the file.
To suppress certain violations please review suppression filters.
Finally, it is worth reading the documentation.
-->

<module name="Checker">
<!--
If you set the basedir property below, then all reported file
names will be relative to the specified directory. See
https://checkstyle.org/config.html#Checker
<property name="basedir" value="${basedir}"/>
-->
<property name="severity" value="error"/>

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

<!-- Excludes all 'module-info.java' files -->
<!-- See https://checkstyle.org/config_filefilters.html -->
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>

<!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
<module name="SuppressionFilter">
<property name="file" value="${org.checkstyle.sun.suppressionfilter.config}" default="checkstyle-suppressions.xml" />
<property name="optional" value="true"/>
</module>

<!-- Checks that a package-info.java file exists for each package. -->
<!-- See https://checkstyle.org/config_javadoc.html#JavadocPackage -->
<!-- TODO: Uncomment the following module after adding Javadocs -->
<!-- <module name="JavadocPackage"/> -->

<!-- Checks whether files end with a new line. -->
<!-- See https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
<module name="NewlineAtEndOfFile"/>

<!-- Checks that property files contain the same keys. -->
<!-- See https://checkstyle.org/config_misc.html#Translation -->
<module name="Translation"/>

<!-- Checks for Size Violations. -->
<!-- See https://checkstyle.org/config_sizes.html -->
<module name="FileLength"/>
<module name="LineLength">
<property name="fileExtensions" value="java"/>
<property name="max" value="120"/>
</module>

<!-- Checks for whitespace -->
<!-- See https://checkstyle.org/config_whitespace.html -->
<module name="FileTabCharacter"/>

<!-- Miscellaneous other checks. -->
<!-- See https://checkstyle.org/config_misc.html -->
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Line has trailing spaces."/>
</module>

<!-- Checks for Headers -->
<!-- See https://checkstyle.org/config_header.html -->
<!-- <module name="Header"> -->
<!-- <property name="headerFile" value="${checkstyle.header.file}"/> -->
<!-- <property name="fileExtensions" value="java"/> -->
<!-- </module> -->

<!-- Enables @SuppressWarnings Support -->
<module name="SuppressWarningsFilter"/>
<module name="TreeWalker">

<!-- Checks for Javadoc comments. -->
<!-- See https://checkstyle.org/config_javadoc.html -->
<module name="InvalidJavadocPosition"/>
<!-- TODO: Uncomment the following four modules after adding Javadocs -->
<!-- <module name="JavadocMethod"/> -->
<!-- <module name="JavadocType"/> -->
<!-- <module name="JavadocVariable"/> -->
<!-- <module name="MissingJavadocMethod"/> -->
<module name="JavadocStyle"/>
<!-- Enables @SuppressWarnings Support -->
<module name="SuppressWarningsHolder"/>

<!-- Checks for Naming Conventions. -->
<!-- See https://checkstyle.org/config_naming.html -->
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>

<!-- Checks for imports -->
<!-- See https://checkstyle.org/config_imports.html -->
<module name="AvoidStarImport"/>
<module name="IllegalImport"/>
<!-- defaults to sun.* packages -->
<module name="RedundantImport"/>
<module name="UnusedImports">
<property name="processJavadoc" value="false"/>
</module>

<!-- Checks for Size Violations. -->
<!-- See https://checkstyle.org/config_sizes.html -->
<module name="MethodLength"/>
<module name="ParameterNumber"/>

<!-- Checks for whitespace -->
<!-- See https://checkstyle.org/config_whitespace.html -->
<module name="EmptyForIteratorPad"/>
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>

<!-- Modifier Checks -->
<!-- See https://checkstyle.org/config_modifiers.html -->
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>

<!-- Checks for blocks. You know, those {}'s -->
<!-- See https://checkstyle.org/config_blocks.html -->
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock"/>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>

<!-- Checks for common coding problems -->
<!-- See https://checkstyle.org/config_coding.html -->
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<!-- <module name="HiddenField"/> -->
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MagicNumber"/>
<module name="MissingSwitchDefault"/>
<module name="MultipleVariableDeclarations"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>

<!-- Checks for class design -->
<!-- See https://checkstyle.org/config_design.html -->
<module name="DesignForExtension"/>
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>

<!-- Miscellaneous other checks. -->
<!-- See https://checkstyle.org/config_misc.html -->
<module name="ArrayTypeStyle"/>
<module name="FinalParameters"/>
<module name="TodoComment"/>
<module name="UpperEll"/>

<!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
<module name="SuppressionXpathFilter">
<property name="file" value="${org.checkstyle.sun.suppressionxpathfilter.config}" default="checkstyle-xpath-suppressions.xml" />
<property name="optional" value="true"/>
</module>
</module>
</module>
15 changes: 15 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ concurrency:
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Lint Code Base
uses: github/super-linter@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_JAVA: true
VALIDATE_PYTHON_FLAKE8: true
# VALIDATE_CSHARP: false
FILTER_REGEX_EXCLUDE: .*Docs/**/*.[py|cs|java]

build-docs:
runs-on: ubuntu-latest

Expand Down
3 changes: 1 addition & 2 deletions Assets/AltTester/AltDriver/AltDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ public AltDevice(string deviceId, string platform, int localPort = 13000, int re
Pid = pid;
}
}
}

}
2 changes: 1 addition & 1 deletion Assets/AltTester/AltDriver/AltDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -581,4 +581,4 @@ public void RemoveNotificationListener(NotificationType notificationType)
new RemoveNotificationListener(communicationHandler, notificationType).Execute();
}
}
}
}
2 changes: 1 addition & 1 deletion Assets/AltTester/AltDriver/AltErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -407,4 +407,4 @@ public ResponseFormatException(Type t, string data) : base("Could not deserializ

}
}
}
}
3 changes: 1 addition & 2 deletions Assets/AltTester/AltDriver/AltPortForwarding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -347,5 +347,4 @@ private static Process startProcess(string processPath, string arguments)
return process;
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ public void Execute()
ValidateResponse("Ok", data);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ public void Execute()
ValidateResponse("Ok", data);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ public void Execute()
ValidateResponse("Ok", data);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,4 @@ public void SleepFor(float time)
Thread.Sleep(System.Convert.ToInt32(time * 1000));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ public System.Collections.Generic.List<AltObject> Execute()
return ReceiveListOfAltObjects(cmdParams);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public interface IDriverCommunication
float GetDelayAfterCommand();
void SleepFor(float time);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public struct AltObjectAction
public string Method;
public string Parameters;
public string TypeOfParameters;

public AltObjectAction(string component = "", string method = "", string parameters = "", string typeOfParameters = "", string assembly = "")
{
Component = component;
Expand All @@ -18,8 +17,6 @@ public AltObjectAction(string component = "", string method = "", string paramet
TypeOfParameters = typeOfParameters;
Assembly = assembly;
}


public string Assembly;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,4 @@ public AltTextureInformation Execute(out AltObject selectedObject)

}
}

}
2 changes: 1 addition & 1 deletion Assets/AltTester/AltDriver/Common/AltAxis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public AltAxis(string name, string negativeButton, string positiveButton, string
this.altNegativeButton = altNegativeButton;
}
}
}
}
2 changes: 1 addition & 1 deletion Assets/AltTester/AltDriver/Common/AltObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,4 @@ public System.Collections.Generic.List<string> GetAllMethods(AltComponent altCom
return altObject;
}
}
}
}
2 changes: 0 additions & 2 deletions Assets/AltTester/AltDriver/Logging/AltLogLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ public enum AltLogLevel
Fatal = 5,
Off = 6,
}


}
1 change: 0 additions & 1 deletion Assets/AltTester/AltDriver/Logging/UnityTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ protected override void Write(LogEventInfo logEvent)
}
}
}

}
#endif
2 changes: 1 addition & 1 deletion Assets/AltTester/AltDriver/UnityStruct/AltKeyCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,4 @@ public enum AltKeyCode
Joystick8Button18 = 508,
Joystick8Button19 = 509
}
}
}
2 changes: 1 addition & 1 deletion Assets/AltTester/AltDriver/UnityStruct/AltVector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ public override string ToString()
return base.ToString();
}
}
}
}
4 changes: 2 additions & 2 deletions Bindings~/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<maven.compiler.version>3.3</maven.compiler.version>
<maven.surefire.version>2.22.1</maven.surefire.version>
<mockito.version>1.10.19</mockito.version>
<lombok.version>1.18.2</lombok.version>
<lombok.version>1.18.26</lombok.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -112,7 +112,7 @@
<artifactId>tyrus-standalone-client</artifactId>
<version>1.9</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand Down
Loading