Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codacy-analysis-cli not respecting CODACY_API_BASE_URL env #518

Open
buravc opened this issue Feb 4, 2025 · 1 comment
Open

codacy-analysis-cli not respecting CODACY_API_BASE_URL env #518

buravc opened this issue Feb 4, 2025 · 1 comment
Assignees

Comments

@buravc
Copy link

buravc commented Feb 4, 2025

Problem
codacy-analysis-cli doesn't respect CODACY_API_BASE_URL even when it is set and exported correctly, and it defaults to https://api.codacy.com instead.

Steps to reproduce

We are using codacy-analysis-cli version 7.9.12. We are trying to configure base URL for Codacy to use our custom host. We tried doing it by exporting the CODACY_API_BASE_URL env variable, And then we tried to run the Codacy Analysis CLI tool using the following command but got the following logs:

$ java -jar codacy-analysis-cli.jar analyze --verbose --upload --tool deadcode --commit-uuid de0665171ac454ca05a0ca93698121bf900e3975

02/04 12:35:54 INFO  c.c.a.c.c.Environment:74 - API base URL found in argument `--codacy-api-base-url` 
02/04 12:35:54 INFO  c.c.a.c.c.Environment:65 - Using API base URL https://api.codacy.com 

Our command doesn't include --codacy-api-base-url as an argument, but logs indicate opposite.

@buravc
Copy link
Author

buravc commented Feb 4, 2025

I think the CLI argument --codacy-api-base-url is set to default in this line. My theory is that it is always assuming Some("https://api.codacy.com") value and never uses the env parameters as a fallback.

@heliocodacy heliocodacy self-assigned this Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants