Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

[Reclamação] Erro ao executar make

Não consigo executar o make de jeito nenhum.

Copiei o arquivo Makefile da aula, conforme abaixo:

lint:
    docker run --rm -itv $(CURDIR):/app -w /app golangci/golangci-lint golangci-lint run controllers/ database/ models/ routes/
    

test:
    docker compose exec app go test main_teste.go

start: 
    docker compose up -d

ci: start lint test

Li que a identação deve ser feita com tab ao invés de espaços, fiz e não adiantou.
Meu ambiente: Linux Ubuntu.

cleyton@RedDragon:~/alura/ic/3983$ make
make: Nothing to be done for 'lint'.
cleyton@RedDragon:~/alura/ic/3983$ make
make: Nothing to be done for 'lint'.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:1: *** multiple target patterns.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:1: *** multiple target patterns.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
make: Nothing to be done for 'lint'.
cleyton@RedDragon:~/alura/ic/3983$ make
make: Nothing to be done for 'lint'.
cleyton@RedDragon:~/alura/ic/3983$ make
make: Nothing to be done for 'lint'.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:11: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
make: Nothing to be done for 'lint'.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:1: *** multiple target patterns.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
make: Nothing to be done for 'lint'.
cleyton@RedDragon:~/alura/ic/3983$ make lint
make: Nothing to be done for 'lint'.
cleyton@RedDragon:~/alura/ic/3983$ make test
make: *** No rule to make target '/app', needed by 'docker'.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make test
Makefile:5: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make lint
Makefile:2: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make lint
Makefile:2: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make lint
Makefile:2: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make lint
Makefile:2: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make lint
make: *** No rule to make target 'echo', needed by 'lint'.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make lint
make: *** No rule to make target 'echo', needed by 'lint'.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make lint
make: *** No rule to make target 'echo', needed by 'lint'.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
make: *** No rule to make target 'echo', needed by 'lint'.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:2: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:2: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:2: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:2: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:6: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make lint
Makefile:6: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:5: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:5: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:5: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:5: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make lint
Makefile:5: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:5: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
make: Nothing to be done for 'lint'.
cleyton@RedDragon:~/alura/ic/3983$ make lint
make: Nothing to be done for 'lint'.
cleyton@RedDragon:~/alura/ic/3983$ make lint
Makefile:1: *** multiple target patterns.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make lint
Makefile:1: *** multiple target patterns.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make lint
make: Nothing to be done for 'lint'.
cleyton@RedDragon:~/alura/ic/3983$ make lint
make: Nothing to be done for 'lint'.
cleyton@RedDragon:~/alura/ic/3983$ make lint
make: Nothing to be done for 'lint'.
cleyton@RedDragon:~/alura/ic/3983$ make lint
Makefile:5: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make lint
Makefile:4: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make lint
make: Nothing to be done for 'lint'.
cleyton@RedDragon:~/alura/ic/3983$ make test
make: *** No rule to make target '/app', needed by 'docker'.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:4: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:4: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:5: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make
Makefile:5: *** missing separator.  Stop.
cleyton@RedDragon:~/alura/ic/3983$ make ci
Makefile:5: *** missing separator.  Stop.
2 respostas
solução!

Depois de muito pesquisar, encontrei a solução em: https://thewang.net/en/blog/makefile-missing-separator-stop-error-in-vscode/#google_vignette

Oi Cleyton, tudo bem?

Que bom saber que você conseguiu resolver o problema!

Qualquer dúvida que surgir, compartilhe no fórum. Abraços e bons estudos!

Alura Conte com o apoio da comunidade Alura na sua jornada. Abraços e bons estudos!