Skip to content
Open
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
55 changes: 55 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This is a basic workflow to build robot code.

name: Checks

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch.
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# This grabs the WPILib docker container
container: wpilib/roborio-cross-ubuntu:2025-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

# Grant execute permission for gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Runs a single command using the runners shell
Comment thread
recepsirin0 marked this conversation as resolved.
- name: Compile robot code
run: ./gradlew compilejava

lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# This grabs the WPILib docker container
container: wpilib/roborio-cross-ubuntu:2025-22.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

# Grant execute permission for gradlew
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Runs a single command using the runners shell
- name: Check Lint and Names of variables etc.
run: ./gradlew check

14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Makefile for FRC robot project

# Build robot code
build:
./gradlew build --stacktrace

# Run unit tests
test:
./gradlew test

# Check lint (checkstyle)
lint-check:
./gradlew checkStyleMain
# You can see the errors on build/reports/checkstyle, open the html file on browser then you can fix it easily.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2025.2.1"
id 'checkstyle'
}

checkstyle {
toolVersion = '10.12.0' // Güncel sürüm
}

java {
Expand Down
30 changes: 30 additions & 0 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">

<module name="Checker">
<module name="TreeWalker">

<!-- for the Class names -->
<module name="TypeName">
<property name="format" value="^[A-Z][a-zA-Z0-9]*$"/>
</module>

<!-- for the Function names -->
<module name="MethodName">
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
</module>

<!-- for the Variable names -->
<module name="LocalVariableName">
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
</module>

<!-- for the Parameters names -->
<module name="ParameterName">
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
</module>

</module>
</module>
6 changes: 2 additions & 4 deletions src/main/java/frc/kelrotlib/example/ExampleLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

public class ExampleLibrary extends SubsystemBase {
/** Creates a new ExampleSubsystem. */
public ExampleLibrary() {
}
public ExampleLibrary() {}

public void exampleMethod() {
}
public void exampleMethod() {}

@Override
public void periodic() {
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

package frc.robot;

public final class Constants {

}
public final class Constants {}
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
package frc.robot;

import edu.wpi.first.wpilibj2.command.Command;

public class RobotContainer {

public RobotContainer() {
configureBindings();
}

private void configureBindings() {
}
private void configureBindings() {}

public Command getAutonomousCommand() {
return null;
Expand Down
16 changes: 5 additions & 11 deletions src/main/java/frc/robot/commands/ExampleCommand.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package frc.robot.commands;

import frc.robot.subsystems.ExampleSubsystem;
import edu.wpi.first.wpilibj2.command.Command;
import frc.robot.subsystems.ExampleSubsystem;

public class ExampleCommand extends Command {
private final ExampleSubsystem m_subsystem;
Expand All @@ -13,27 +13,21 @@ public class ExampleCommand extends Command {
*/
public ExampleCommand(ExampleSubsystem subsystem) {
m_subsystem = subsystem;

addRequirements(subsystem);
}

// Called when the command is initially scheduled.
@Override
public void initialize() {

}
public void initialize() {}

// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {

}
public void execute() {}

// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {

}
public void end(boolean interrupted) {}

// Returns true when the command should end.
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@

public class ExampleLibrarySubsystem extends ExampleLibrary {

public ExampleLibrarySubsystem() {

}
public ExampleLibrarySubsystem() {}
}
4 changes: 1 addition & 3 deletions src/main/java/frc/robot/subsystems/ExampleSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

public class ExampleSubsystem extends SubsystemBase {
/** Creates a new ExampleSubsystem. */
public ExampleSubsystem() {

}
public ExampleSubsystem() {}

@Override
public void periodic() {
Expand Down