You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2019/11/13 19:47:48 UTC
[GitHub] [nifi-minifi-cpp] asdaraujo commented on a change in pull request
#670: MINIFICPP-1074 - TailFileTests was not working on WIN32 due do CLRF
asdaraujo commented on a change in pull request #670: MINIFICPP-1074 - TailFileTests was not working on WIN32 due do CLRF
URL: https://github.com/apache/nifi-minifi-cpp/pull/670#discussion_r345967109
##########
File path: extensions/standard-processors/tests/unit/TailFileTests.cpp
##########
@@ -41,11 +41,44 @@
#include "TailFile.h"
#include "LogAttribute.h"
-static std::string NEWLINE_FILE = "" // NOLINT
- "one,two,three\n"
- "four,five,six, seven";
-static const char *TMP_FILE = "minifi-tmpfile.txt";
-static const char *STATE_FILE = "minifi-state-file.txt";
+#ifdef WIN32
+int CR_LEN = 1;
+#else
+int CR_LEN = 0;
+#endif
+
+static std::string FIRST_LINE = "one,two,three"; // NOLINT
Review comment:
Even after making it const I still get linter errors:
```
For a static/global string constant, use a C style string instead: "static const char FIRST_LINE[]"
```
Is it ok to leave it as a `const std::string` and with the `// NOLINT` directive?
----------------------------------------------------------------
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
With regards,
Apache Git Services