Skip to content

Commit

Permalink
Fix part of #3690 : Wiki update - How to run static CI check locally (#…
Browse files Browse the repository at this point in the history
…5108)

<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation

Fix part of #3690 : Wiki Update - How to run static CI check locally

<!--
- Explain what your PR does. If this PR fixes an existing bug, please
include
- "Fixes #bugnum:" in the explanation so that GitHub can auto-close the
issue
  - when this PR is merged.
  -->

## Essential Checklist
<!-- Please tick the relevant boxes by putting an "x" in them. -->
- [x] The PR title and explanation each start with "Fix #bugnum: " (If
this PR fixes part of an issue, prefix the title with "Fix part of
#bugnum: ...".)
- [ ] Any changes to
[scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets)
files have their rationale included in the PR explanation.
- [x] The PR follows the [style
guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide).
- [x] The PR does not contain any unnecessary code changes from Android
Studio
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)).
- [x] The PR is made from a branch that's **not** called "develop" and
is up-to-date with "develop".
- [x] The PR is **assigned** to the appropriate reviewers
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).

## For UI-specific PRs only
<!-- Delete these section if this PR does not include UI-related
changes. -->
If your PR includes UI-related changes, then:
- Add screenshots for portrait/landscape for both a tablet & phone of
the before & after UI changes
- For the screenshots above, include both English and pseudo-localized
(RTL) screenshots (see [RTL
guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines))
- Add a video showing the full UX flow with a screen reader enabled (see
[accessibility
guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide))
- Add a screenshot demonstrating that you ran affected Espresso tests
locally & that they're passing
  • Loading branch information
MohitGupta121 authored Jul 28, 2023
1 parent faf148b commit 3e81ff6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
24 changes: 12 additions & 12 deletions scripts/assets/todo_open_exemptions.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -294,16 +294,16 @@ todo_open_exemption {

todo_open_exemption {
exempted_file_path: "wiki/Static-Analysis-Checks.md"
line_number: 169
line_number: 177
line_number: 182
line_number: 186
line_number: 190
line_number: 192
line_number: 207
line_number: 217
line_number: 220
line_number: 223
line_number: 226
line_number: 229
line_number: 170
line_number: 178
line_number: 183
line_number: 187
line_number: 191
line_number: 193
line_number: 208
line_number: 218
line_number: 221
line_number: 224
line_number: 227
line_number: 230
}
9 changes: 9 additions & 0 deletions wiki/Static-Analysis-Checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [KDoc validity check](#kdoc-validity-check)
- [TODO open checks](#todo-open-checks)
- [TODO issue resolved check](#todo-issue-resolved-check)
- [How to run static checks locally](#how-to-run-static-checks-locally)

# Background
Static analysis is a method of debugging by examining source code before a program is run. It’s done by analyzing a set of code against a set (or multiple sets) of coding rules.
Expand Down Expand Up @@ -227,3 +228,11 @@ To fix the failures for this check: resolve the TODO items and then close the is

# How to add a new Static analysis check
// TODO([#3690](https://github.com/oppia/oppia-android/issues/3690)): Complete static checks Wiki

# How to run static checks locally

- Go to the failing CI check in your GitHub PR.
- Scroll to the top of the failing CI check logs, and find the Bazel command that was run for this script.
- Alternatively, in Android Studio, go to the `.github` folder and find the [static_checks.yml](https://github.com/oppia/oppia-android/blob/develop/.github/workflows/static_checks.yml) file. Search for the line that corresponds to the name of the job that failed. You can then run the same script on your local terminal.

Note: Before running the script command in your local terminal, make sure you have Bazel installed. To learn how to set up Bazel for Oppia Android, follow these [instructions](https://github.com/oppia/oppia-android/wiki/Oppia-Bazel-Setup-Instructions).

0 comments on commit 3e81ff6

Please sign in to comment.