diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..26ecd31 --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,23 @@ +name: Pylint + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + - name: Analysing the code with pylint + run: | + pylint $(git ls-files '*.py') diff --git a/demo.py b/demo.py new file mode 100644 index 0000000..6a16b35 --- /dev/null +++ b/demo.py @@ -0,0 +1,7 @@ +def my_function(): + + a = 5 + return a + + +my_function() diff --git a/testing.py b/testing.py index 94febcd..44de8b7 100644 --- a/testing.py +++ b/testing.py @@ -1 +1,13 @@ -print("Hello Dosto") \ No newline at end of file +""" +This module contains a simple hello function. +""" + +def hello(): + """ + This function returns a greeting message. + """ + return "Hello Dosto" + + +if __name__ == "__main__": + hello()