Skip to content

Conversation

@RincewindsHat
Copy link
Member

  • clang-format
  • copyright update

config.check_crit,
(long)(1000 * config.critical_value), true, 0,
false, 0));
perfdata("voltage", (long)(1000 * ups_utility_voltage), "mV", config.check_warn, (long)(1000 * config.warning_value), config.check_crit,
Copy link
Contributor

Choose a reason for hiding this comment

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

i don't think this is better than the current format.

@RincewindsHat
Copy link
Member Author

@sni: Play around a little bit with the options. What do you think about this one?

Copy link
Contributor

@sni sni left a comment

Choose a reason for hiding this comment

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

small complaints, but i am willing to drop them for the sake of a consistent format.

perfdata("voltage", (long)(1000 * ups_utility_voltage),
"mV", config.check_warn,
xasprintf(&data,
"%s",
Copy link
Contributor

Choose a reason for hiding this comment

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

looks better, except these lines with the format on a single line

Copy link
Member Author

Choose a reason for hiding this comment

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

hm, i will play a bit more with the binpack parameters

Copy link
Member Author

Choose a reason for hiding this comment

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

so, changed BinPack. Arguments are again more compressed. Maybe a little bit too much, but to change that the line length should be reduced I guess.
@sni: How do you like it?

"will return a WARNING"));
printf("%s\n", _("state. If the UPS is off or has a low battery the plugin "
"will return a CRITICAL"));
printf("%s\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

and those...

@sni
Copy link
Contributor

sni commented Oct 25, 2024

i'd say, so far, this is the best variant. Still not perfect...
so, if possible, i guess it would still be a manual decision whether you
put multiple arguments on separate lines or not. Ex. the go formatter keeps
your manual decision about that.

@RincewindsHat RincewindsHat merged commit 6b20391 into monitoring-plugins:master Oct 26, 2024
7 checks passed
@RincewindsHat RincewindsHat deleted the cleanup/check_ups branch October 26, 2024 04:57
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