From commits-return-9815-archive-asf-public=cust-asf.ponee.io@nuttx.apache.org Mon May 18 23:32:50 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8720C18062B for ; Tue, 19 May 2020 01:32:50 +0200 (CEST) Received: (qmail 17499 invoked by uid 500); 18 May 2020 23:32:50 -0000 Mailing-List: contact commits-help@nuttx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nuttx.apache.org Delivered-To: mailing list commits@nuttx.apache.org Received: (qmail 17490 invoked by uid 99); 18 May 2020 23:32:49 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 May 2020 23:32:49 +0000 From: =?utf-8?q?GitBox?= To: commits@nuttx.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bincubator-nuttx=5D_hartmannathan_opened_a_new_pull?= =?utf-8?q?_request_=231067=3A_nxstyle=3A_Allow_Hz=2C_KHz=2C_GHz_in_identifi?= =?utf-8?q?ers?= Message-ID: Date: Mon, 18 May 2020 23:32:49 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit hartmannathan opened a new pull request #1067: URL: https://github.com/apache/incubator-nuttx/pull/1067 ## Summary Per the coding standard, we allow MHz as one of the few allowed exceptions to the identifier case rules. However, because this exception specifically looked for "MHz" we would generate undeserved nxstyle errors for Hz, KHz, GHz. This change adds recognition of any Hz value by eliminating the requirement for Hz to be preceded by M. tools/nxstyle.c: * main(): Eliminate requirement for Hz to be preceded by M to match the rule for allowed mixed case identifier. Update relevant comments. See: https://cwiki.apache.org/confluence/display/NUTTX/Coding+Standard#macros Mailing list discussion archived at: https://lists.apache.org/thread.html/r481b9d145f439c24c8d70992081bf670bc0e893167149e0017519439%40%3Cdev.nuttx.apache.org%3E ## Impact Several undeserved nxstyle errors will be eliminated for identifiers such as GPIO_SPEED_400KHz, which are allowed, but were not recognized by the rule because it didn't match «MHz». ## Testing Confirmed: - Compiles without errors or warnings. - No longer produces undeserved errors for GPIO_SPEED_400KHz. - nxstyle passes nxstyle. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org