diff --git a/.github/workflows/duplicate-code.yml b/.github/workflows/duplicate-code.yml new file mode 100644 index 00000000..1696e729 --- /dev/null +++ b/.github/workflows/duplicate-code.yml @@ -0,0 +1,18 @@ +name: Duplicate code + +on: pull_request + +jobs: + duplicate-code-check: + name: Check for duplicate code + # Trigger the tool only when a comment containing the keyword is published in a pull request + # if: github.event.issue.pull_request && contains(github.event.comment.body, 'run_duplicate_code_detection_tool') + runs-on: ubuntu-20.04 + steps: + - name: Check for duplicate code + uses: platisd/duplicate-code-detection-tool@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + directories: "src" + ignore_below: 0 + file_extensions: "cpp"