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

feature: Use log prefix as format #890

Merged
merged 1 commit into from
Nov 4, 2017
Merged

Conversation

rhuss
Copy link
Collaborator

@rhuss rhuss commented Nov 4, 2017

This replaces #876 as its a bit more flexible and does not require a new configuration option.
You can use now a prefix %z for an empty string

throw new IllegalArgumentException(String.format("No image name format element '%%%s' known", what) );
}
String val = lookup.lookup();
return String.format("%" + (options != null ? options : "") + "s",val);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Format specifiers should be used instead of string concatenation. rule

@codecov
Copy link

codecov bot commented Nov 4, 2017

Codecov Report

Merging #890 into master will increase coverage by 0.14%.
The diff coverage is 93.33%.

@@             Coverage Diff              @@
##             master     #890      +/-   ##
============================================
+ Coverage      50.7%   50.84%   +0.14%     
- Complexity     1203     1208       +5     
============================================
  Files           139      140       +1     
  Lines          7106     7123      +17     
  Branches        953      953              
============================================
+ Hits           3603     3622      +19     
  Misses         3189     3189              
+ Partials        314      312       -2
Impacted Files Coverage Δ Complexity Δ
...o/fabric8/maven/docker/log/DefaultLogCallback.java 81.81% <ø> (ø) 11 <0> (ø) ⬇️
.../fabric8/maven/docker/util/ImageNameFormatter.java 94.11% <100%> (+0.14%) 11 <1> (-3) ⬇️
...ava/io/fabric8/maven/docker/log/LogOutputSpec.java 45.58% <100%> (ø) 8 <1> (ø) ⬇️
...fabric8/maven/docker/log/LogOutputSpecFactory.java 83.33% <90.9%> (+12.74%) 8 <3> (+3) ⬆️
...ic8/maven/docker/util/FormatParameterReplacer.java 94.44% <94.44%> (ø) 5 <5> (?)

@codecov
Copy link

codecov bot commented Nov 4, 2017

Codecov Report

Merging #890 into master will increase coverage by 0.14%.
The diff coverage is 93.33%.

@@             Coverage Diff              @@
##             master     #890      +/-   ##
============================================
+ Coverage      50.7%   50.84%   +0.14%     
- Complexity     1203     1208       +5     
============================================
  Files           139      140       +1     
  Lines          7106     7123      +17     
  Branches        953      953              
============================================
+ Hits           3603     3622      +19     
  Misses         3189     3189              
+ Partials        314      312       -2
Impacted Files Coverage Δ Complexity Δ
...o/fabric8/maven/docker/log/DefaultLogCallback.java 81.81% <ø> (ø) 11 <0> (ø) ⬇️
...ava/io/fabric8/maven/docker/log/LogOutputSpec.java 45.58% <100%> (ø) 8 <1> (ø) ⬇️
.../fabric8/maven/docker/util/ImageNameFormatter.java 94.11% <100%> (+0.14%) 11 <1> (-3) ⬇️
...fabric8/maven/docker/log/LogOutputSpecFactory.java 83.33% <90.9%> (+12.74%) 8 <3> (+3) ⬆️
...ic8/maven/docker/util/FormatParameterReplacer.java 94.44% <94.44%> (ø) 5 <5> (?)

This replaces fabric8io#876 as its a bit more flexible and does not require a new configuration option.
You can use now a prefix `%z` for an empty string
@pepperbot
Copy link
Collaborator

SonarQube analysis reported 1 issue

  • MAJOR 1 major

Watch the comments in this conversation to review them.

@rhuss rhuss merged commit f100d7d into fabric8io:master Nov 4, 2017
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

Successfully merging this pull request may close these issues.

2 participants