Skip to content

Commit

Permalink
Add missing metadata
Browse files Browse the repository at this point in the history
Added missing SHA metadata, commit date, and the branch of the commit.
  • Loading branch information
garrettsummerfi3ld committed Feb 21, 2024
1 parent ba8958c commit e450b7f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public void robotInit() {
Logger.recordMetadata("ProjectName", "2024-Robot");
Logger.recordMetadata("RuntimeType", getRuntimeType().toString());
Logger.recordMetadata("BuildDate", BuildConstants.BUILD_DATE);
Logger.recordMetadata("GitSHA", null);
Logger.recordMetadata("GitDate", null);
Logger.recordMetadata("GitBranch", null);
Logger.recordMetadata("GitSHA", BuildConstants.GIT_SHA);
Logger.recordMetadata("GitDate", BuildConstants.GIT_DATE);
Logger.recordMetadata("GitBranch", BuildConstants.GIT_BRANCH);
// Determine if the git repo is dirty
switch (BuildConstants.DIRTY) {
case 0:

Check warning on line 63 in src/main/java/frc/robot/Robot.java

View workflow job for this annotation

GitHub Actions / qodana

Nullability and data flow problems

Switch label `0` is unreachable
Expand Down Expand Up @@ -85,7 +85,6 @@ public void robotInit() {
}
Logger.addDataReceiver(new WPILOGWriter(LogFileUtil.addPathSuffix(logPath, "_sim")));

Check warning on line 86 in src/main/java/frc/robot/Robot.java

View workflow job for this annotation

GitHub Actions / qodana

Nullability and data flow problems

Argument `logPath` might be null
}
Logger.recordMetadata("GitSHA", BuildConstants.GIT_SHA);

// Start logging
Logger.start();
Expand Down

0 comments on commit e450b7f

Please sign in to comment.