From 3de2d84e2bc35789af6031c10f33277e1bbf35ff Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 31 Oct 2019 22:42:22 +0200 Subject: [PATCH] Fixed an issue with a GCC Linter for PlatformIO IDE for Atom // Resolve #3218 --- HISTORY.rst | 3 ++- platformio/ide/tpls/atom/.gcc-flags.json.tpl | 2 +- platformio/ide/tpls/vim/.gcc-flags.json.tpl | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 0b7f21ca..dfe12b1a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -18,7 +18,7 @@ PlatformIO Core 4.0 - Unused variables or functions - Out of scope memory usage. -* `PlatformIO Home 3.0 `__ +* `PlatformIO Home 3.0 `__ and Project Inspection - Static Code Analysis - Firmware File Explorer @@ -39,6 +39,7 @@ PlatformIO Core 4.0 * Fixed an issue when booleans in "platformio.ini" are not parsed properly (`issue #3022 `_) * Fixed an issue with invalid encoding when generating project for Visual Studio (`issue #3183 `_) * Fixed an issue when Project Config Parser does not remove in-line comments when Python 3 is used (`issue #3213 `_) +* Fixed an issue with a GCC Linter for PlatformIO IDE for Atom (`issue #3218 `_) 4.0.3 (2019-08-30) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/ide/tpls/atom/.gcc-flags.json.tpl b/platformio/ide/tpls/atom/.gcc-flags.json.tpl index cbb47418..d2ddcf78 100644 --- a/platformio/ide/tpls/atom/.gcc-flags.json.tpl +++ b/platformio/ide/tpls/atom/.gcc-flags.json.tpl @@ -1,4 +1,4 @@ -% _defines = " ".join(["-D%s" % d for d in defines]) +% _defines = " ".join(["-D%s" % d.replace(" ", "\\\\ ") for d in defines]) { "execPath": "{{ cxx_path }}", "gccDefaultCFlags": "-fsyntax-only {{! cc_flags.replace(' -MMD ', ' ').replace('"', '\\"') }} {{ !_defines.replace('"', '\\"') }}", diff --git a/platformio/ide/tpls/vim/.gcc-flags.json.tpl b/platformio/ide/tpls/vim/.gcc-flags.json.tpl index b9b29fdb..d2ddcf78 100644 --- a/platformio/ide/tpls/vim/.gcc-flags.json.tpl +++ b/platformio/ide/tpls/vim/.gcc-flags.json.tpl @@ -1,9 +1,9 @@ -% _defines = " ".join(["-D%s" % d for d in defines]) +% _defines = " ".join(["-D%s" % d.replace(" ", "\\\\ ") for d in defines]) { "execPath": "{{ cxx_path }}", "gccDefaultCFlags": "-fsyntax-only {{! cc_flags.replace(' -MMD ', ' ').replace('"', '\\"') }} {{ !_defines.replace('"', '\\"') }}", "gccDefaultCppFlags": "-fsyntax-only {{! cxx_flags.replace(' -MMD ', ' ').replace('"', '\\"') }} {{ !_defines.replace('"', '\\"') }}", "gccErrorLimit": 15, - "gccIncludePaths": "{{! ','.join("'{}'".format(inc) for inc in includes)}}", + "gccIncludePaths": "{{ ','.join(includes) }}", "gccSuppressWarnings": false }