1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tools: make v test-cleancode test everything by default (#10050)

This commit is contained in:
Delyan Angelov
2021-05-08 13:32:29 +03:00
committed by GitHub
parent cba2cb6b9c
commit 8a380f4699
132 changed files with 3230 additions and 3440 deletions

View File

@@ -1,92 +1,92 @@
module gx
pub const (
blue = Color{
blue = Color{
r: 0
g: 0
b: 255
}
red = Color{
red = Color{
r: 255
g: 0
b: 0
}
green = Color{
green = Color{
r: 0
g: 255
b: 0
}
yellow = Color{
yellow = Color{
r: 255
g: 255
b: 0
}
orange = Color{
orange = Color{
r: 255
g: 165
b: 0
}
purple = Color{
purple = Color{
r: 128
g: 0
b: 128
}
black = Color{
black = Color{
r: 0
g: 0
b: 0
}
gray = Color{
gray = Color{
r: 128
g: 128
b: 128
}
indigo = Color{
indigo = Color{
r: 75
g: 0
b: 130
}
pink = Color{
pink = Color{
r: 255
g: 192
b: 203
}
violet = Color{
violet = Color{
r: 238
g: 130
b: 238
}
white = Color{
white = Color{
r: 255
g: 255
b: 255
}
dark_blue = Color{
dark_blue = Color{
r: 0
g: 0
b: 139
}
dark_gray = Color{
dark_gray = Color{
r: 169
g: 169
b: 169
}
dark_green = Color{
dark_green = Color{
r: 0
g: 100
b: 0
}
dark_red = Color{
dark_red = Color{
r: 139
g: 0
b: 0
}
light_blue = Color{
light_blue = Color{
r: 173
g: 216
b: 230
}
light_gray = Color{
light_gray = Color{
r: 211
g: 211
b: 211
@@ -96,7 +96,7 @@ pub const (
g: 238
b: 144
}
light_red = Color{
light_red = Color{
r: 255
g: 204
b: 203
@@ -118,7 +118,7 @@ pub fn hex(color int) Color {
r: byte((color >> 24) & 0xFF)
g: byte((color >> 16) & 0xFF)
b: byte((color >> 8) & 0xFF)
a: byte((color) & 0xFF)
a: byte(color & 0xFF)
}
}
@@ -197,7 +197,7 @@ pub fn (c Color) bgra8() int {
return (int(c.b) << 24) + (int(c.g) << 16) + (int(c.r) << 8) + int(c.a)
}
// abgr8 - convert a color value to an int in the ABGR8 order.
// abgr8 - convert a color value to an int in the ABGR8 order.
// see https://developer.apple.com/documentation/coreimage/ciformat
[inline]
pub fn (c Color) abgr8() int {
@@ -205,7 +205,7 @@ pub fn (c Color) abgr8() int {
}
const (
string_colors = {
string_colors = map{
'black': black
'blue': blue
'red': red
@@ -213,5 +213,5 @@ const (
)
pub fn color_from_string(s string) Color {
return string_colors[s]
return gx.string_colors[s]
}

View File

@@ -2,7 +2,7 @@ module gx
pub struct Image {
mut:
obj voidptr
obj voidptr
pub:
id int
width int