Skip to content

Commit

Permalink
Merge pull request #5 from stanford-ssi/setup/linting-action
Browse files Browse the repository at this point in the history
Setup/linting action
  • Loading branch information
devYaoYH authored Oct 26, 2024
2 parents 58d8f7c + a590399 commit bb06f16
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/c_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
format-review: true
passive-reviews: true
- name: Fail if there are linter errors
if: ${{steps.linter.outputs.clang-format-checks-failed}}
if: ${{steps.linter.outputs.clang-format-checks-failed > 0}}
run: |
echo "Linter errors occurred, failing the job."
exit 1 # This will cause the step to fail
3 changes: 1 addition & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ slate_t slate;
int main()
{
// Some ugly code with linter errors
int x = 10
+ 5;
int x = 10 + 5;
stdio_init_all();

/*
Expand Down
2 changes: 1 addition & 1 deletion src/scheduler/scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void sched_dispatch(slate_t *slate)
/*
* Transition to the next state, if required.
*/
sched_state_t * const next_state = current_state_info->get_next_state(slate);
sched_state_t *const next_state = current_state_info->get_next_state(slate);
if (next_state != current_state_info)
{
LOG_INFO("sched: Transitioning to state %s", next_state->name);
Expand Down
2 changes: 1 addition & 1 deletion src/state_machine/states/states.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extern sched_state_t running_state;
* nearer the top have higher priority.
*/
static const sched_state_t *all_states[] = {&init_state, &running_state};
static sched_state_t * const initial_state = &init_state;
static sched_state_t *const initial_state = &init_state;

/*
* Must be a macro because it is used to initialize an array
Expand Down

0 comments on commit bb06f16

Please sign in to comment.