MCPcopy Create free account
hub / github.com/FastLED/FastLED / check_all_packages

Function check_all_packages

ci/util/package_validator.py:156–188  ·  view source on GitHub ↗

Check all packages for environment are valid. Args: project_dir: PlatformIO project directory environment: Environment name Returns: (all_valid, list_of_errors)

(project_dir: Path, environment: str)

Source from the content-addressed store, hash-verified

154
155
156def check_all_packages(project_dir: Path, environment: str) -> tuple[bool, list[str]]:
157 """Check all packages for environment are valid.
158
159 Args:
160 project_dir: PlatformIO project directory
161 environment: Environment name
162
163 Returns:
164 (all_valid, list_of_errors)
165 """
166 errors: list[str] = []
167
168 # Get list of required packages
169 required_packages = get_required_packages(project_dir, environment)
170
171 if not required_packages:
172 # Could not determine packages - skip validation
173 # This will fall through to the fast-path check in client
174 return True, []
175
176 pio_packages_dir = Path.home() / ".platformio" / "packages"
177
178 for package in required_packages:
179 package_dir = pio_packages_dir / package
180 if not package_dir.exists():
181 errors.append(f"Missing package: {package}")
182 continue
183
184 is_valid, error_msg = validate_package(package_dir)
185 if not is_valid:
186 errors.append(error_msg)
187
188 return len(errors) == 0, errors
189
190
191def main() -> int:

Callers 3

process_package_requestFunction · 0.90
mainFunction · 0.70

Calls 3

get_required_packagesFunction · 0.85
validate_packageFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected