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

Version flag implementation #198

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

artis101
Copy link

  • What kind of change does this PR introduce?
    New feature - CLI version flag: --version, -version, --v and -v
  • What is the current behavior?
    Currently it does not exist. vim integrations are unable to determine version
  • What is the new behavior?
    It returns version string like this:
    arduino-language-server git-snapshot (c3a0e49 2024-10-30) for git development version
    arduino-language-server 0.7.6 (c3a0e49 2024-10-30) for tagged releases
    arduino-language-server 0.0.0-git at the very minimum if all information is missing

  • Other information:
    I added some rudimentary tests covering version.

func TestVersionInitialization(t *testing.T) {
	info := NewInfo("TestApp")
	if info.VersionString != defaultVersionString {
		t.Errorf("Expected default version '%s', got '%s'", defaultVersionString, info.VersionString)
	}
}

test like this is non-deterministic due to how task overrides environment variables and affects defaults. Perhaps I am overthinking. Please let me know what you think.


@per1234 per1234 linked an issue Oct 31, 2024 that may be closed by this pull request
3 tasks
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing -version flag
2 participants