Skip to content

Commit c10aa07

Browse files
committed
Fix the lint issues
Signed-off-by: Aravinda Vishwanathapura <[email protected]>
1 parent 75f18bc commit c10aa07

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

.github/workflows/on-pr-submit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: make lint
2727
- name: Install Binnacle
2828
run: |
29-
curl -L https://github.com/kadalu/binnacle/releases/latest/download/binnacle -o binnacle
29+
curl -L https://github.com/kadalu/binnacle/releases/download/0.6.1/binnacle -o binnacle
3030
chmod +x ./binnacle
3131
sudo mv ./binnacle /usr/local/bin/binnacle
3232
binnacle --version

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ fmt-check:
55

66
lint:
77
cd lint && shards install
8-
./lint/bin/ameba src
8+
./lint/bin/ameba --except Documentation/DocumentationAdmonition src
99

1010
fmt:
1111
crystal tool format src

lint/shard.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ version: 2.0
22
shards:
33
ameba:
44
git: https://github.com/crystal-ameba/ameba.git
5-
version: 1.0.0
5+
version: 1.6.1
66

lint/shard.yml

-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ license: GPLv3
1212
development_dependencies:
1313
ameba:
1414
github: crystal-ameba/ameba
15-
version: 1.0.0

src/args.cr

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ module GlusterMetricsExporter
2727
@@config.gluster_host = name
2828
end
2929

30-
parser.on("-v", "--verbose", "Enable verbose output (default: #{@@config.verbose})") do
30+
parser.on("-v", "--verbose", "Enable verbose output (default: #{@@config.verbose?})") do
3131
@@config.verbose = true
3232
end
3333

34-
parser.on("--disable-all", "Disable all Metrics (default: #{@@config.disable_all_metrics})") do
34+
parser.on("--disable-all", "Disable all Metrics (default: #{@@config.disable_all_metrics?})") do
3535
@@config.disable_all_metrics = true
3636
end
3737

38-
parser.on("--disable-volumes-all", "Disable all Volumes (default: #{@@config.disable_volumes_all})") do
38+
parser.on("--disable-volumes-all", "Disable all Volumes (default: #{@@config.disable_volumes_all?})") do
3939
@@config.disable_volumes_all = true
4040
end
4141

src/config.cr

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,24 @@ module GlusterMetricsExporter
66

77
property metrics_path = "/metrics",
88
port = 9713,
9-
disable_volumes_all = false,
109
gluster_executable_path = "/usr/sbin/gluster",
11-
disable_all_metrics = false,
1210
log_level = "info",
1311
log_dir = "/var/log/gluster-metrics-exporter",
1412
log_file = "exporter.log",
1513
gluster_log_dir = "/var/log/glusterfs",
1614
glusterd_dir = "/var/lib/glusterd",
1715
gluster_cli_socket_path = "",
18-
verbose = false,
1916
gluster_host = "",
2017
disabled_volumes = [] of String,
2118
enabled_volumes = [] of String,
2219
disabled_metrics = [] of String,
2320
enabled_metrics = [] of String,
2421
all_metrics = [] of String
2522

23+
property? verbose = false,
24+
disable_volumes_all = false,
25+
disable_all_metrics = false
26+
2627
def initialize
2728
end
2829

@@ -35,7 +36,7 @@ module GlusterMetricsExporter
3536

3637
def self.set_enabled_metrics
3738
metrics = [] of String
38-
if @@config.disable_all_metrics
39+
if @@config.disable_all_metrics?
3940
# If --disable-all is passed then enabled list
4041
# will only have whatever passed as --enable
4142
# For example --disable-all --enable "volume_status"

tests/install.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ USE_REMOTE_PLUGIN "docker"
44
nodes = ["gserver1", "gserver2", "gserver3"]
55

66
# Static build Kadalu Storage Manager
7-
TEST "docker run --rm -i -v $PWD:/workspace -w /workspace crystallang/crystal:1.2.0-alpine /bin/sh -c \"apk add --update --no-cache --force-overwrite sqlite-dev sqlite-static && shards install && shards build --static\""
7+
TEST "docker run --rm -i -v $PWD:/workspace -w /workspace crystallang/crystal:1.12-alpine /bin/sh -c \"shards install && shards build --static\""
88

99
# Install the Static binary to all containers/nodes
1010
# and copy the service files

0 commit comments

Comments
 (0)