diff options
| author | ruki <[email protected]> | 2025-09-29 22:10:21 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-09-29 22:10:21 +0800 |
| commit | 25c60fd7db271e2f59bae730366867b7d648684f (patch) | |
| tree | 7200b0f2d17cd7494db3935de9a8d0e5012f5632 /xmake/modules/private/action/require/impl/check_api.lua | |
| parent | 87451e315f744dff0bd953cdfb72ca7ff1451835 (diff) | |
| parent | 4d0f2e29c75179d2efd4f5536821f8212556411c (diff) | |
Merge pull request #6850 from Shiffted/check_package_api
add package api checking
Diffstat (limited to 'xmake/modules/private/action/require/impl/check_api.lua')
| -rw-r--r-- | xmake/modules/private/action/require/impl/check_api.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/xmake/modules/private/action/require/impl/check_api.lua b/xmake/modules/private/action/require/impl/check_api.lua new file mode 100644 index 000000000..7fd5459c1 --- /dev/null +++ b/xmake/modules/private/action/require/impl/check_api.lua @@ -0,0 +1,32 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015-present, Xmake Open Source Community. +-- +-- @author Shiffted +-- @file check_api.lua +-- + +import("private.check.checker") +import("private.check.show") + +function main(package) + local checkers = checker.checkers() + for name, info in table.orderpairs(checkers) do + if info.load then + local check = import("private.check.checkers." .. name, {anonymous = true}) + check({package = package, show = show.wshow}) + end + end +end |
