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

Environment variable for viewer URL #3634

Open
detuur opened this issue Mar 18, 2022 · 4 comments
Open

Environment variable for viewer URL #3634

detuur opened this issue Mar 18, 2022 · 4 comments
Labels
CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands enhancement 🌟 usability 👍 Usability-related features

Comments

@detuur
Copy link

detuur commented Mar 18, 2022

Is your feature request related to a problem? Please describe.
This is a matter of UX. Currently, there is no way to specify a default URL for CLI commands. If none is passed as a parameter, http://localhost:8001 is assumed. Adding the URL every time introduces considerable visual clutter, not to mention it takes significantly more time if you're simply in an interactive session where you use a bunch of CodeChecker commands. Shell aliases are not an option.

Describe the solution you would like
An environment variable is a clean and portable way of setting the remote server URL for all commands that need it.

Describe alternatives you have considered
Alternatively, this could also be part of a configuration file, like .codechecker.passwords.json. This is probably more work to program, as well as set up for end users. Doesn't seem worth it.

@bruntib
Copy link
Contributor

bruntib commented Mar 25, 2022

Hi,

There is an option for using a config file. Would you think, that this solves the problem?
https://github.com/Ericsson/codechecker/blob/master/docs/config_file.md

@bruntib
Copy link
Contributor

bruntib commented Apr 29, 2022

The goal of this ticket could be having a default value to --config flag. This could point to a config file in the workspace directory by default.

@dkrupp
Copy link
Member

dkrupp commented Apr 29, 2022

I think this is a good idea.

@detuur what do you think about creating a config files as described in https://github.com/Ericsson/codechecker/blob/master/docs/config_file.md?
there you can specify the url.

By default CodeChecker analyzer would read the config from the default workspace dir:

~/.codechecker/codechecker.json

and we would introduce an env variable too for specifying the workspace dir if the default workspace location would not be appropriate:
$CC_WORKSPACE

@detuur
Copy link
Author

detuur commented May 17, 2022

I had not seen the documentation for the config file, that's very useful. But indeed, introducting an additional env variable for this config file's location would solve the UX issue. This would also be in line with existing env variables such as CC_PASS_FILE and CC_SESSION_FILE. I do think that CC_CONFIG_FILE would follow the current naming scheme better.

@whisperity whisperity added CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands usability 👍 Usability-related features labels May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands enhancement 🌟 usability 👍 Usability-related features
Projects
None yet
Development

No branches or pull requests

4 participants