Skip to content

Commit 65af112

Browse files
authored
fix check tools (#19)
1 parent ee5bcf0 commit 65af112

File tree

27 files changed

+189
-2095
lines changed

27 files changed

+189
-2095
lines changed

.github/workflows/core.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,3 @@ jobs:
4545
if: ${{ matrix.python-version == '3.11' }}
4646
run: |
4747
tox -e testcore
48-
49-
- name: Slack Notification
50-
uses: homoluctus/slatify@master
51-
if: failure()
52-
with:
53-
type: ${{ job.status }}
54-
job_name: '*Core*'
55-
commit: true
56-
url: ${{ secrets.SLACK_BUILD_WEBHOOK }}
57-
token: ${{ secrets.SLACK_GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ coverage.xml
1111
htmlcov
1212
.pytest_cache
1313
.vscode/settings.json
14+
.DS_Store

HISTORY.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ test-driven methodologies, and modern toolchains for unrivaled success.
2323
~~~~~~~~~~~~~~~~~~~
2424

2525
* Fixed a regression issue where custom build flags were not properly reflected in the `compile_commands.json <https://docs.platformio.org/en/latest/integration/compile_commands.html>`__ file, ensuring accurate compilation database generation
26+
* Fixed an issue where fully-qualified serial port URLs (e.g., ``rfc2217://host:port``) were incorrectly treated as wildcard patterns (`issue #5225 <https://github.com/platformio/platformio-core/issues/5225>`_)
2627

2728
6.1.18 (2025-03-11)
2829
~~~~~~~~~~~~~~~~~~~

platformio/__init__.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,20 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
VERSION = (6, 1, 19)
15+
VERSION = (6, 1, 18)
1616
__version__ = ".".join([str(s) for s in VERSION])
1717

18-
__title__ = "platformio"
18+
__title__ = "pioarduino core"
1919
__description__ = (
20-
"Your Gateway to Embedded Software Development Excellence. "
21-
"Unlock the true potential of embedded software development "
22-
"with PlatformIO's collaborative ecosystem, embracing "
23-
"declarative principles, test-driven methodologies, and "
24-
"modern toolchains for unrivaled success."
20+
"pioarduino core is needed to run pioarduino Platform espressif32. "
2521
)
26-
__url__ = "https://platformio.org"
22+
__url__ = "https://github.com/pioarduino"
2723

28-
__author__ = "PlatformIO Labs"
29-
__email__ = "[email protected]"
24+
__author__ = "PlatformIO Labs and pioarduino"
25+
__email__ = ""
3026

3127
__license__ = "Apache Software License"
32-
__copyright__ = "Copyright 2014-present PlatformIO Labs"
28+
__copyright__ = "Copyright 2014-present PlatformIO Labs and pioarduino"
3329

3430
__accounts_api__ = "https://api.accounts.platformio.org"
3531
__registry_mirror_hosts__ = [
@@ -41,4 +37,4 @@
4137
__check_internet_hosts__ = [
4238
"185.199.110.153", # Github.com
4339
"github.com",
44-
] + __registry_mirror_hosts__
40+
]

platformio/builder/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
os.makedirs(env.subst("$BUILD_DIR"))
152152

153153
# Dynamically load dependent tools
154-
if "compiledb" in COMMAND_LINE_TARGETS:
154+
if "compiledb" in COMMAND_LINE_TARGETS or "compiledbtc" in COMMAND_LINE_TARGETS:
155155
env.Tool("compilation_db")
156156

157157
env.LoadProjectOptions()
@@ -195,6 +195,9 @@
195195
if "compiledb" in COMMAND_LINE_TARGETS:
196196
env.Alias("compiledb", env.CompilationDatabase("$COMPILATIONDB_PATH"))
197197

198+
if "compiledbtc" in COMMAND_LINE_TARGETS:
199+
env.Alias("compiledbtc", env.CompilationDatabase("$COMPILATIONDB_PATH"))
200+
198201
# Print configured protocols
199202
env.AddPreAction(
200203
"upload",

platformio/builder/tools/piobuild.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def GetBuildType(env):
6060
def BuildProgram(env):
6161
env.ProcessProgramDeps()
6262
env.ProcessCompileDbToolchainOption()
63+
env.ProcessCompileDbIncludeToolchainOption()
6364
env.ProcessProjectDeps()
6465

6566
# append into the beginning a main LD script
@@ -128,10 +129,7 @@ def _append_pio_macros():
128129
env.ProcessUnFlags(env.get("BUILD_UNFLAGS"))
129130

130131

131-
def ProcessCompileDbToolchainOption(env):
132-
if "compiledb" not in COMMAND_LINE_TARGETS:
133-
return
134-
132+
def ProccessCompileDb(env, include_toolchain=False):
135133
# Resolve absolute path of toolchain
136134
for cmd in ("CC", "CXX", "AS"):
137135
if cmd not in env:
@@ -142,13 +140,25 @@ def ProcessCompileDbToolchainOption(env):
142140
if " " in env[cmd]: # issue #4998: Space in compilator path
143141
env[cmd] = f'"{env[cmd]}"'
144142

145-
if env.get("COMPILATIONDB_INCLUDE_TOOLCHAIN"):
146-
print("Warning! `COMPILATIONDB_INCLUDE_TOOLCHAIN` is scoping")
143+
if include_toolchain:
147144
for scope, includes in env.DumpIntegrationIncludes().items():
148145
if scope in ("toolchain",):
149146
env.Append(CPPPATH=includes)
150147

151148

149+
def ProcessCompileDbToolchainOption(env):
150+
if "compiledb" in COMMAND_LINE_TARGETS:
151+
ProccessCompileDb(env)
152+
153+
if env.get("COMPILATIONDB_INCLUDE_TOOLCHAIN"):
154+
print("Warning! `COMPILATIONDB_INCLUDE_TOOLCHAIN` is scoping")
155+
print("Use 'pio run -t compiledbtc' instead.")
156+
ProccessCompileDb(env, include_toolchain=True)
157+
158+
def ProcessCompileDbIncludeToolchainOption(env):
159+
if "compiledbtc" in COMMAND_LINE_TARGETS:
160+
ProccessCompileDb(env, include_toolchain=True)
161+
152162
def ProcessProjectDeps(env):
153163
plb = env.ConfigureProjectLibBuilder()
154164

@@ -388,6 +398,7 @@ def generate(env):
388398
env.AddMethod(BuildProgram)
389399
env.AddMethod(ProcessProgramDeps)
390400
env.AddMethod(ProcessCompileDbToolchainOption)
401+
env.AddMethod(ProcessCompileDbIncludeToolchainOption)
391402
env.AddMethod(ProcessProjectDeps)
392403
env.AddMethod(ParseFlagsExtended)
393404
env.AddMethod(ProcessFlags)

platformio/builder/tools/piolib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ def build(self):
497497

498498
self.env.PrependUnique(CPPPATH=self.get_include_dirs())
499499
self.env.ProcessCompileDbToolchainOption()
500+
self.env.ProcessCompileDbIncludeToolchainOption()
500501

501502
if self.lib_ldf_mode == "off":
502503
for lb in self.env.GetLibBuilders():

platformio/builder/tools/piomaxlen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def _file_long_data(env, data):
7070

7171

7272
def exists(env):
73-
return "compiledb" not in COMMAND_LINE_TARGETS and not env.IsIntegrationDump()
73+
return "compiledb" and "compiledbtc" not in COMMAND_LINE_TARGETS and not env.IsIntegrationDump()
7474

7575

7676
def generate(env):

platformio/check/tools/clangtidy.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import os
1516
import re
16-
from os.path import join
1717

1818
from platformio.check.defect import DefectItem
1919
from platformio.check.tools.base import CheckToolBase
20+
from platformio.project.config import ProjectConfig
2021

2122

2223
class ClangtidyCheckTool(CheckToolBase):
@@ -55,7 +56,11 @@ def is_check_successful(cmd_result):
5556
return cmd_result["returncode"] < 2
5657

5758
def configure_command(self):
58-
tool_path = join(self.get_tool_dir("tool-clangtidy"), "clang-tidy")
59+
tool_path = os.path.join(
60+
ProjectConfig.get_instance().get("platformio","packages_dir"),
61+
"tool-clangtidy",
62+
"clang-tidy"
63+
)
5964

6065
cmd = [tool_path, "--quiet"]
6166
flags = self.get_flags("clangtidy")

0 commit comments

Comments
 (0)