cb424d7448
verify-patch-sanity.py validates every active recipe .patch has internally- consistent hunk line counts — catching the 'malformed patch at line N' failure at commit/CI/preflight time instead of hours into a cook. This cycle hit that class three times (qtwaylandscanner, sddm, xwayland), each only discovered when cookbook tried to apply the patch. Running it across the repo found 29 latent malformed patches (validated against GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22'). They were harmless only because they sit in vendored recipes (baked, not re- applied) — but would fail on any version-bump re-derivation. --fix recounts the hunk headers (body untouched) and repaired all 29. Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test (test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats (empty placeholders, bare-@@ git hunks).
40 lines
1.1 KiB
Fortran
40 lines
1.1 KiB
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
|
|
program p
|
|
!PORTABILITY: Name 'p' declared in a main program should not have the same name as the main program [-Wbenign-name-clash]
|
|
integer :: p
|
|
end
|
|
module m
|
|
!PORTABILITY: Name 'm' declared in a module should not have the same name as the module [-Wbenign-name-clash]
|
|
integer :: m
|
|
end
|
|
submodule(m) sm
|
|
!PORTABILITY: Name 'sm' declared in a submodule should not have the same name as the submodule [-Wbenign-name-clash]
|
|
integer :: sm
|
|
end
|
|
block data bd
|
|
!PORTABILITY: Name 'bd' declared in a BLOCK DATA subprogram should not have the same name as the BLOCK DATA subprogram [-Wbenign-name-clash]
|
|
type bd
|
|
end type
|
|
end
|
|
module m2
|
|
type :: t
|
|
end type
|
|
interface
|
|
subroutine s
|
|
!ERROR: Module 'm2' cannot USE itself
|
|
use m2, only: t
|
|
end subroutine
|
|
end interface
|
|
end module
|
|
subroutine s
|
|
!ERROR: 's' is already declared in this scoping unit
|
|
integer :: s
|
|
end
|
|
function f() result(res)
|
|
integer :: res
|
|
!ERROR: 'f' is already declared in this scoping unit
|
|
!ERROR: The type of 'f' has already been declared
|
|
real :: f
|
|
res = 1
|
|
end
|