Skip to content

transifex/txlint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About The Project

An opinionated linter for Transifex Projects

It consists of the following parts:

How to use

Lint specific files

docker run --rm \
    --user ${USER_ID}:${GROUP_ID} \
    --mount src="$(pwd)",target=/src,type=bind \
    transifex/txlint --files \
    file_1.py /path/to/file_2.py

Lint current branch

git diff origin/devel..$(git rev-parse HEAD) --name-only | \
    xargs docker run --rm \
        --user $(id -u):$(id -g) \
        --mount src="$(pwd)",target=/src,type=bind \
        transifex/txlint --files

Makefile integration

pre-commit:
    git diff origin/devel..$(git rev-parse HEAD) --name-only | \
        xargs docker run --rm \
            --user $$(id -u):$$(id -g) \
            --mount src="$(pwd)",target=/src,type=bind \
            transifex/txlint --files

Integrate with Jenkins

  1. Ideally you would have a Makefile containing the previous example:
  2. Add the following stage in your Jenkinsfile :
    stage('Run linter') {
        when {
            anyOf {
                changeRequest()
            }
        }
        steps {
            sh 'make pre-commit'
        }
    }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •