Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • dev
  • github/fork/vyskocilpavel/auth_active_probe_config
  • main
  • probes_script
  • renovate/commitlint
  • renovate/docker-7.x
  • renovate/lock-file-maintenance
  • xpavlic/run_probes_jpmu_test
  • v1.0.0
  • v1.1.0
  • v1.10.0
  • v1.11.0
  • v1.2.0
  • v1.3.0
  • v1.4.0
  • v1.5.0
  • v1.6.0
  • v1.7.0
  • v1.7.1
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.3
  • v1.8.4
  • v1.8.5
  • v1.9.0
  • v1.9.1
  • v1.9.2
  • v2.0.0
  • v2.1.0
  • v2.2.0
  • v2.2.1
  • v2.2.2
  • v2.3.0
  • v2.4.0
  • v2.5.0
  • v2.5.1
  • v2.5.2
  • v2.5.3
  • v2.5.4
  • v2.6.0
  • v2.7.0
  • v2.7.1
  • v2.7.2
  • v2.7.3
  • v2.7.4
  • v3.0.0
  • v3.1.0
48 results

Target

Select target project
  • perun/perun-proxyidp/perun-proxy-utils
1 result
Select Git revision
  • dev
  • github/fork/vyskocilpavel/auth_active_probe_config
  • main
  • probes_script
  • renovate/commitlint
  • renovate/docker-7.x
  • renovate/lock-file-maintenance
  • xpavlic/run_probes_jpmu_test
  • v1.0.0
  • v1.1.0
  • v1.10.0
  • v1.11.0
  • v1.2.0
  • v1.3.0
  • v1.4.0
  • v1.5.0
  • v1.6.0
  • v1.7.0
  • v1.7.1
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.3
  • v1.8.4
  • v1.8.5
  • v1.9.0
  • v1.9.1
  • v1.9.2
  • v2.0.0
  • v2.1.0
  • v2.2.0
  • v2.2.1
  • v2.2.2
  • v2.3.0
  • v2.4.0
  • v2.5.0
  • v2.5.1
  • v2.5.2
  • v2.5.3
  • v2.5.4
  • v2.6.0
  • v2.7.0
  • v2.7.1
  • v2.7.2
  • v2.7.3
  • v2.7.4
  • v3.0.0
  • v3.1.0
48 results
Show changes
Commits on Source (3)
## [1.9.1](https://gitlab.ics.muni.cz/perun-proxy-aai/python/perun-proxy-utils/compare/v1.9.0...v1.9.1) (2023-08-23)
### Bug Fixes
* check_php_syntax to work with containers ([5cfec90](https://gitlab.ics.muni.cz/perun-proxy-aai/python/perun-proxy-utils/commit/5cfec908071110ae676cef899014ee1e8ec24481))
# [1.9.0](https://gitlab.ics.muni.cz/perun-proxy-aai/python/perun-proxy-utils/compare/v1.8.5...v1.9.0) (2023-08-21)
......
#!/usr/bin/env python3
import os
import subprocess
import sys
import argparse
......@@ -20,39 +19,42 @@ def get_args():
" automatically generated files"
)
)
parser.add_argument(
"-c",
"--container",
required=True,
help="Docker container name to run PHP syntax check inside",
)
parser.add_argument(
"-d",
"--directory",
required=True,
help="path which will be scanned for PHP files, including subdirectories",
help=(
"path inside container which will be scanned for PHP files, including"
" subdirectories"
),
)
return parser.parse_args()
def main():
dir = get_args().directory
os.chdir(dir)
paths = []
for (
dirpath,
dirname,
filenames,
) in os.walk("."):
for f in filenames:
if f.endswith(".php"):
paths.append(
os.path.join(
dirpath,
f,
)
)
args = get_args()
dir = args.directory
container = args.container
container_paths = (
subprocess.getoutput(
f"docker exec {container} find {dir} -type f -name '*.php'"
)
.strip()
.split("\n")
)
global_result = ""
for path in paths:
if os.path.isfile(path):
result = subprocess.getoutput(f"php -l {path}")
if not result.startswith("No syntax errors"):
global_result += f"{result} | "
for path in container_paths:
result = subprocess.getoutput(f"docker exec {container} php -l {path}")
if "No syntax errors" not in result:
global_result += f"{result} | "
if not global_result:
print(f"{OK} check_php_syntax - OK")
......
[metadata]
version = 1.9.0
version = 1.9.1
license_files = LICENSE
long_description = file: README.md
long_description_content_type = text/markdown
......