Re: nxstyle mixed case identifiers

2020-05-18 Thread Juha Niskanen (Haltian)
and mega-amperes... Best Regards, Juha From: Nathan Hartman Sent: Tuesday, May 19, 2020 2:48 AM To: dev@nuttx.apache.org Subject: Re: nxstyle mixed case identifiers On Mon, May 18, 2020 at 7:48 PM Gregory Nutt wrote: > >> I started out life a a tin

Re: nxstyle mixed case identifiers

2020-05-18 Thread Nathan Hartman
On Mon, May 18, 2020 at 7:48 PM Gregory Nutt wrote: > >> I started out life a a tiny, ad hoc program to help me review code and > >> then became indispensable. It was never designed; it just evolved. > > Some programs just "happen" that way, and work fine, and there's no > > need to replace them.

Re: nxstyle mixed case identifiers

2020-05-18 Thread Gregory Nutt
I started out life a a tiny, ad hoc program to help me review code and then became indispensable. It was never designed; it just evolved. Some programs just "happen" that way, and work fine, and there's no need to replace them. True.  However, there is some software for which you are less pro

Re: nxstyle mixed case identifiers

2020-05-18 Thread Nathan Hartman
On Mon, May 18, 2020 at 7:39 PM Gregory Nutt wrote: > You should feel free to just modify nxstyle at any time you like. :-) > I started out life a a tiny, ad hoc program to help me review code and > then became indispensable. It was never designed; it just evolved. Some programs just "happen"

Re: nxstyle mixed case identifiers

2020-05-18 Thread Gregory Nutt
LGTM. I can't come up with any credible case where that would fail badly. I suppose if someone wanted SHMOOZHz that would be okay albeit weird. One would normally expect a limited number of things before the H, but I don't think we need be concerned about that. I first considered making the

Re: nxstyle mixed case identifiers

2020-05-18 Thread Nathan Hartman
Submitted PR1067. Cheers, Nathan

Re: nxstyle mixed case identifiers

2020-05-18 Thread Nathan Hartman
On Mon, May 18, 2020 at 7:20 PM Gregory Nutt wrote: > LGTM. I can't come up with any credible case where that would fail > badly. I suppose if someone wanted SHMOOZHz that would be okay albeit > weird. One would normally expect a limited number of things before the > H, but I don't think we nee

Re: nxstyle mixed case identifiers

2020-05-18 Thread Gregory Nutt
case 'z': if (!have_upper || n < 1 || line[n - 1] != 'H') { have_lower = true; } break;

Re: nxstyle mixed case identifiers

2020-05-18 Thread Nathan Hartman
On Mon, May 18, 2020 at 6:29 PM Gregory Nutt wrote: > > Are abbreviations like MHz, KHz, Hz, intended to be exceptions to the > > mixed case rules? > > Yes, the coding standard is here: snip > If that is not working, then please consider a PR. I see logic that > picks off and ignores MHz but no

Re: nxstyle mixed case identifiers

2020-05-18 Thread Gregory Nutt
nxstyle produces errors about mixed case identifiers like the following, which are found throughout the system: GPIO_SPEED_100MHz GPIO_SPEED_10MHz GPIO_SPEED_120MHz GPIO_SPEED_25MHz GPIO_SPEED_2MHz GPIO_SPEED_400KHz GPIO_SPEED_40MHz GPIO_SPEED_50MHz GPIO_SPEED_5MHz Are abbreviations like MHz,

nxstyle mixed case identifiers

2020-05-18 Thread Nathan Hartman
nxstyle produces errors about mixed case identifiers like the following, which are found throughout the system: GPIO_SPEED_100MHz GPIO_SPEED_10MHz GPIO_SPEED_120MHz GPIO_SPEED_25MHz GPIO_SPEED_2MHz GPIO_SPEED_400KHz GPIO_SPEED_40MHz GPIO_SPEED_50MHz GPIO_SPEED_5MHz Are abbreviations like MHz, KHz