cli/command/image: fix "unused-receiver", "line-length-limit" linting
cli/command/image/remove_test.go:24:7: unused-receiver: method receiver 'n' is not referenced in method's body, consider removing or renaming it as _ (revive) func (n notFound) NotFound() {} ^ cli/command/image/formatter_history_test.go:110: line-length-limit: line is 558 characters, out of limit 200 (revive) withTabs := `/bin/sh -c apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 && echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list && apt-get update && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates nginx=${NGINX_VERSION} nginx-module-xslt nginx-module-geoip nginx-module-image-filter nginx-module-perl nginx-module-njs gettext-base && rm -rf /var/lib/apt/lists/*` //nolint:lll cli/command/image/formatter_history_test.go:111: line-length-limit: line is 552 characters, out of limit 200 (revive) expected := `/bin/sh -c apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 && echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list && apt-get update && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates nginx=${NGINX_VERSION} nginx-module-xslt nginx-module-geoip nginx-module-image-filter nginx-module-perl nginx-module-njs gettext-base && rm -rf /var/lib/apt/lists/*` //nolint:lll Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
e2f28fac47
commit
3e44cc4d00
@ -107,8 +107,8 @@ func TestHistoryContext_CreatedSince(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestHistoryContext_CreatedBy(t *testing.T) {
|
func TestHistoryContext_CreatedBy(t *testing.T) {
|
||||||
withTabs := `/bin/sh -c apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 && echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list && apt-get update && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates nginx=${NGINX_VERSION} nginx-module-xslt nginx-module-geoip nginx-module-image-filter nginx-module-perl nginx-module-njs gettext-base && rm -rf /var/lib/apt/lists/*` //nolint:lll
|
const withTabs = `/bin/sh -c apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 && echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list && apt-get update && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates nginx=${NGINX_VERSION} nginx-module-xslt nginx-module-geoip nginx-module-image-filter nginx-module-perl nginx-module-njs gettext-base && rm -rf /var/lib/apt/lists/*` //nolint:lll,revive
|
||||||
expected := `/bin/sh -c apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 && echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list && apt-get update && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates nginx=${NGINX_VERSION} nginx-module-xslt nginx-module-geoip nginx-module-image-filter nginx-module-perl nginx-module-njs gettext-base && rm -rf /var/lib/apt/lists/*` //nolint:lll
|
const expected = `/bin/sh -c apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 && echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list && apt-get update && apt-get install --no-install-recommends --no-install-suggests -y ca-certificates nginx=${NGINX_VERSION} nginx-module-xslt nginx-module-geoip nginx-module-image-filter nginx-module-perl nginx-module-njs gettext-base && rm -rf /var/lib/apt/lists/*` //nolint:lll,revive
|
||||||
|
|
||||||
var ctx historyContext
|
var ctx historyContext
|
||||||
cases := []historyCase{
|
cases := []historyCase{
|
||||||
@ -138,8 +138,8 @@ func TestHistoryContext_CreatedBy(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestHistoryContext_Size(t *testing.T) {
|
func TestHistoryContext_Size(t *testing.T) {
|
||||||
size := int64(182964289)
|
const size = int64(182964289)
|
||||||
expected := "183MB"
|
const expected = "183MB"
|
||||||
|
|
||||||
var ctx historyContext
|
var ctx historyContext
|
||||||
cases := []historyCase{
|
cases := []historyCase{
|
||||||
@ -170,7 +170,7 @@ func TestHistoryContext_Size(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestHistoryContext_Comment(t *testing.T) {
|
func TestHistoryContext_Comment(t *testing.T) {
|
||||||
comment := "Some comment"
|
const comment = "Some comment"
|
||||||
|
|
||||||
var ctx historyContext
|
var ctx historyContext
|
||||||
cases := []historyCase{
|
cases := []historyCase{
|
||||||
|
@ -21,7 +21,7 @@ func (n notFound) Error() string {
|
|||||||
return "Error: No such image: " + n.imageID
|
return "Error: No such image: " + n.imageID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n notFound) NotFound() {}
|
func (notFound) NotFound() {}
|
||||||
|
|
||||||
func TestNewRemoveCommandAlias(t *testing.T) {
|
func TestNewRemoveCommandAlias(t *testing.T) {
|
||||||
cmd := newRemoveCommand(test.NewFakeCli(&fakeClient{}))
|
cmd := newRemoveCommand(test.NewFakeCli(&fakeClient{}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user