• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

devonfw / IDEasy / 11963246771

21 Nov 2024 11:10PM UTC coverage: 67.428% (+0.2%) from 67.239%
11963246771

push

github

web-flow
#754: bullet proof solution for processable output and logging (#777)

2487 of 4028 branches covered (61.74%)

Branch coverage included in aggregate %.

6454 of 9232 relevant lines covered (69.91%)

3.09 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

62.5
cli/src/main/java/com/devonfw/tools/ide/commandlet/VersionCommandlet.java
1
package com.devonfw.tools.ide.commandlet;
2

3
import com.devonfw.tools.ide.context.IdeContext;
4
import com.devonfw.tools.ide.log.IdeLogLevel;
5
import com.devonfw.tools.ide.property.FlagProperty;
6
import com.devonfw.tools.ide.version.IdeVersion;
7

8
/**
9
 * Prints the IDEasy version and exits
10
 */
11
public class VersionCommandlet extends Commandlet {
12

13
  /**
14
   * The constructor.
15
   *
16
   * @param context the {@link IdeContext}.
17
   */
18
  public VersionCommandlet(IdeContext context) {
19

20
    super(context);
3✔
21
    addKeyword(new FlagProperty(getName(), true, "-v"));
9✔
22
  }
1✔
23

24
  @Override
25
  public String getName() {
26

27
    return "--version";
2✔
28
  }
29

30
  @Override
31
  public boolean isIdeRootRequired() {
32

33
    return false;
2✔
34
  }
35

36
  @Override
37
  public boolean isProcessableOutput() {
38

39
    return true;
×
40
  }
41

42
  @Override
43
  public void run() {
44

45
    this.context.level(IdeLogLevel.PROCESSABLE).log(IdeVersion.get());
×
46
  }
×
47
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc