github.com/terraform-linters/tflint@v0.51.2-0.20240520175844-3750771571b6/docs/developer-guide/building.md (about) 1 # Building TFLint 2 3 Go 1.22 or higher is required to build TFLint from source code. Clone the source code and run the `make` command. Built binary will be placed in `dist` directory. 4 5 ```console 6 $ git clone https://github.com/terraform-linters/tflint.git 7 $ cd tflint 8 $ make 9 mkdir -p dist 10 go build -v -o dist/tflint 11 ``` 12 13 ## Run tests 14 15 If you change code, make sure that the tests you add and existing tests will be passed: 16 17 ```console 18 $ make test 19 ``` 20 21 Some tests depending on Git submodules. Running `make test` will update these automatically, but if you run tests directly with `go test`, you need to update submodules manually: 22 23 ```sh 24 git submodule init 25 git submodule update 26 ``` 27 28 ## Run E2E tests 29 30 You can check the actual CLI behavior by running the E2E tests. Since the E2E tests uses the installed `tflint` command, it is necessary to add the path into `$PATH` environment so that the binary built by `go install` can be referenced. 31 32 ```console 33 $ make e2e 34 ```