Re: [PR] examples/hx711: add new program to test hx711 chip [nuttx-apps]
xiaoxiang781216 merged PR #2317: URL: https://github.com/apache/nuttx-apps/pull/2317 -- 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. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] examples/hx711: add new program to test hx711 chip [nuttx-apps]
mlyszczek commented on PR #2317: URL: https://github.com/apache/nuttx-apps/pull/2317#issuecomment-1971841584 Very well then. Should be fixed now. -- 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. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] examples/hx711: add new program to test hx711 chip [nuttx-apps]
jerpelea commented on PR #2317: URL: https://github.com/apache/nuttx-apps/pull/2317#issuecomment-1969243631 +1 for 80 characters limit -- 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. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] examples/hx711: add new program to test hx711 chip [nuttx-apps]
mlyszczek commented on PR #2317: URL: https://github.com/apache/nuttx-apps/pull/2317#issuecomment-1969204654 I am all game for 80ch line width. Shorter lines are way easier to read than longer. Hell, I think newspapers keep it down at 40 characters or so, their columns are always so thin. But I am against sticking to some arbitrary rule 100% of time. Especially if that rule in specific case hinders readability. These lines are still < 80ch, because I didn't want long lines in terminal output, but since these are in switch statement they are quite far right. I would opt in to remove indentation for these strings altogether, but that is going to break another rule (easy to fix, if first character is " then ignore indent). I'm not gonna argue here really, just showing my point of view. I will break these lines if you wish, no problem, really. I just think, this rule should be lifted for strings. And as a bonus some Linux Kernel documentation where 80 still seem to be preferred line width. ``` The preferred limit on the length of a single line is 80 columns. Statements longer than 80 columns should be broken into sensible chunks, **unless exceeding 80 columns significantly increases readability and does not hide information.** (...) However, never break user-visible strings such as printk messages because that breaks the ability to grep for them. ``` -- 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. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] examples/hx711: add new program to test hx711 chip [nuttx-apps]
acassis commented on PR #2317: URL: https://github.com/apache/nuttx-apps/pull/2317#issuecomment-1969162349 > I think it looks kinda bad, it's harder to see how output is going to be printed and is hard to grep later on. Even Linux allows for long strings without breaking. > > How about I write patch to nxstyle to ignore such cases? I think it would be enough to simply check if line ends with an `"` then in that case ignore line length warning? @mlyszczek I think it is happening on Linux because they increased the column from 80 to 120. If you download an old kernel (i.e. 2.6 series) you will see they enforce 80 column limit event for strings. -- 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. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] examples/hx711: add new program to test hx711 chip [nuttx-apps]
mlyszczek commented on PR #2317: URL: https://github.com/apache/nuttx-apps/pull/2317#issuecomment-1968406041 I think it looks kinda bad, it's harder to see how output is going to be printed and is hard to grep later on. Even Linux allows for long strings without breaking. How about I write patch to nxstyle to ignore such cases? I think it would be enough to simply check if line ends with an `"` then in that case ignore line length warning? -- 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. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] examples/hx711: add new program to test hx711 chip [nuttx-apps]
xiaoxiang781216 commented on PR #2317: URL: https://github.com/apache/nuttx-apps/pull/2317#issuecomment-1968388644 > These are strings. Aren't strings exempted from this check? I wanted to remove indentation at first, but then checker complains about no indentation. you can split to two short string, for example: ``` "\t-t tares the scale with specified precision," "might take few seconds to complete.\n" ``` -- 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. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] examples/hx711: add new program to test hx711 chip [nuttx-apps]
mlyszczek commented on PR #2317: URL: https://github.com/apache/nuttx-apps/pull/2317#issuecomment-1968336199 These are strings. Aren't strings exempted from this check? I wanted to remove indentation at first, but then checker complains about no indentation. -- 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. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] examples/hx711: add new program to test hx711 chip [nuttx-apps]
xiaoxiang781216 commented on PR #2317: URL: https://github.com/apache/nuttx-apps/pull/2317#issuecomment-1968071356 @mlyszczek please fix the follow warning: ``` ERROR __main__.py:618: Check failed: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/hx711/CMakeLists.txt Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/hx711/hx711_main.c:79:109: error: Long line found Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/hx711/hx711_main.c:80:108: error: Long line found Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/hx711/hx711_main.c:81:79: error: Long line found Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/hx711/hx711_main.c:82:92: error: Long line found Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/hx711/hx711_main.c:84:95: error: Long line found Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/hx711/hx711_main.c:85:97: error: Long line found Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/hx711/hx711_main.c:86:95: error: Long line found Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/hx711/hx711_main.c:88:80: error: Long line found Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/hx711/hx711_main.c:89:83: error: Long line found Error: /home/runner/work/nuttx-apps/nuttx-apps/apps/examples/hx711/hx711_main.c:91:99: error: Long line found ``` -- 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. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org