Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Commit 0fca9cc

Browse files
authored
Merge branch 'scaleracademy:main' into main
2 parents b9eaea4 + 5b25af0 commit 0fca9cc

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/linter.yaml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Lint Code Base
2+
3+
on:
4+
push:
5+
branches-ignore: [master, main]
6+
# Remove the line above to run when pushing to master
7+
pull_request:
8+
branches: [master, main]
9+
10+
jobs:
11+
build:
12+
# Name the Job
13+
name: Lint Code Base
14+
# Set the agent to run on
15+
runs-on: ubuntu-latest
16+
17+
##################
18+
# Load all steps #
19+
##################
20+
steps:
21+
##########################
22+
# Checkout the code base #
23+
##########################
24+
- name: Checkout Code
25+
uses: actions/checkout@v3
26+
with:
27+
# Full git history is needed to get a proper list of changed files within `super-linter`
28+
fetch-depth: 0
29+
30+
################################
31+
# Run Linter against code base #
32+
################################
33+
- name: Lint Code Base
34+
uses: github/super-linter@v4
35+
env:
36+
VALIDATE_ALL_CODEBASE: false
37+
DEFAULT_BRANCH: main
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Challenges/challenge_19.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Welcome to Challenge 19
2+
3+
Welcome to the 19th Challenge
4+
5+
Today's challenge is unique. Today we will learn about code linting. A linter is defined as follows:
6+
- Lint, or a linter, is a static code analysis tool used to flag programming errors, bugs, stylistic errors and suspicious constructs.
7+
8+
So in order to ensure proper codestyling and structure, there are checks run on pull requests to ensure the code is properly linted. We have also placed a code linter Github action which will keep a track whether your code is properly linted or not.
9+
10+
Task:
11+
1. Create a new file inside your branch created in previous challenges ``your-username-details`` under the directory ``contributors/username``. The file needs to be a source code file written in your preferred programming language. The code can be anything you want: hello world program or your favorite program.
12+
2. Commit the change and push it.
13+
3. Check if your linting fails in side the Pull request: <img width="870" alt="image" src="https://user-images.githubusercontent.com/19529592/190969615-f3205b26-83eb-4b5f-b7a5-19567a575a9a.png"> <br> Then lint your code to ensure that this check passes inside your pull request.

0 commit comments

Comments
 (0)