<commit_before>version: 2
jobs:
  integration-test:
    docker:
      - image: circleci/openjdk:8-jdk
    working_directory: ~/sentinel
    environment:
      MAVEN_OPTS: -Xmx3200m
    steps:
      - checkout
      # Run tests
      - run: mvn integration-test

  document-lint:
    docker: 
      # this image is build from Dockerfile 
      # https://github.com/pouchcontainer/pouchlinter/blob/master/Dockerfile
      - image: pouchcontainer/pouchlinter:v0.1.2
    working_directory: ~/sentinel
    steps:
      - checkout
      - run:
          name: use markdownlint v0.5.0 to lint markdown file (https://github.com/markdownlint/markdownlint)
          command: |
            find  ./ -name  "*.md" | grep -v vendor | grep -v commandline |  grep -v .github |  grep -v swagger |  grep -v api |  xargs mdl -r ~MD010,~MD013,~MD024,~MD029,~MD033,~MD036
      - run:
          name: use markdown-link-check(https://github.com/tcort/markdown-link-check) to check links in markdown files
          command: |
            set +e
            for name in $(find . -name \*.md | grep -v vendor | grep -v CHANGELOG); do 
              if [ -f $name ]; then 
                markdown-link-check -q $name; 
                if [ $? -ne 0 ]; then
                  code=1
                fi
              fi 
            done 
            bash -c "exit $code";
      - run:
          name: use opensource tool client9/misspell to correct commonly misspelled English words 
          command: |
            find  ./* -name  "*"  | grep -v vendor | xargs misspell -error
      - run:
          name: use ShellCheck (https://github.com/koalaman/shellcheck) to check the validateness of shell scripts in pouch repo
          command: |
            find ./ -name "*.sh" | grep -v vendor | xargs shellcheck<commit_msg>Remove markdown-lint-checker from Circle CI lint workflow (there are some bugs in the checker)<commit_after>version: 2
jobs:
  integration-test:
    docker:
      - image: circleci/openjdk:8-jdk
    working_directory: ~/sentinel
    environment:
      MAVEN_OPTS: -Xmx3200m
    steps:
      - checkout
      # Run tests
      - run: mvn integration-test

  document-lint:
    docker: 
      # this image is build from Dockerfile 
      # https://github.com/pouchcontainer/pouchlinter/blob/master/Dockerfile
      - image: pouchcontainer/pouchlinter:v0.1.2
    working_directory: ~/sentinel
    steps:
      - checkout
      - run:
          name: use markdownlint v0.5.0 to lint markdown file (https://github.com/markdownlint/markdownlint)
          command: |
            find  ./ -name  "*.md" | grep -v vendor | grep -v commandline |  grep -v .github |  grep -v swagger |  grep -v api |  xargs mdl -r ~MD010,~MD013,~MD024,~MD029,~MD033,~MD036
#      - run:
#          name: use markdown-link-check(https://github.com/tcort/markdown-link-check) to check links in markdown files
#          command: |
#            set +e
#            for name in $(find . -name \*.md | grep -v vendor | grep -v CHANGELOG); do
#              if [ -f $name ]; then
#                markdown-link-check -q $name;
#                if [ $? -ne 0 ]; then
#                  code=1
#                fi
#              fi
#            done
#            bash -c "exit $code";
      - run:
          name: use opensource tool client9/misspell to correct commonly misspelled English words 
          command: |
            find  ./* -name  "*"  | grep -v vendor | xargs misspell -error
      - run:
          name: use ShellCheck (https://github.com/koalaman/shellcheck) to check the validateness of shell scripts in pouch repo
          command: |
            find ./ -name "*.sh" | grep -v vendor | xargs shellcheck
{'fraction_non_alphanumeric': 0.10707508809975604, 'fraction_numerical': 0.017891027378693414, 'mean_word_length': 1.7599102468212415, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4470420', 'n_tokens_mistral': 1232, 'n_tokens_neox': 1117, 'n_words': 326}