diff options
| author | ruki <[email protected]> | 2023-02-21 09:54:49 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-02-21 09:54:49 +0800 |
| commit | 8ea58baa753ebcbfce5cd434a92e3dd369da0e0d (patch) | |
| tree | 70a852b2c674ea283b873732dbbb44969a47d987 /xmake/plugins/check/checkers/api/target | |
| parent | 775cc38c761e02fa3ff4825eabca344b98c75b78 (diff) | |
| parent | 0fc0959c413b6cb1900f59fee403502f7b8ae2e8 (diff) | |
Merge pull request #3397 from xmake-io/check
Improve check and add devlink checker
Diffstat (limited to 'xmake/plugins/check/checkers/api/target')
24 files changed, 0 insertions, 753 deletions
diff --git a/xmake/plugins/check/checkers/api/target/asflags.lua b/xmake/plugins/check/checkers/api/target/asflags.lua deleted file mode 100644 index ad98a329b..000000000 --- a/xmake/plugins/check/checkers/api/target/asflags.lua +++ /dev/null @@ -1,33 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file asflags.lua --- - --- imports -import("core.tool.compiler") -import(".api_checker") - -function main() - api_checker.check_targets("asflags", {check = function(target, value) - local compinst = target:compiler("as") - if not compinst:has_flags(value) then - return false, string.format("%s: unknown assembler flag '%s'", compinst:name(), value) - end - return true - end}) -end diff --git a/xmake/plugins/check/checkers/api/target/cflags.lua b/xmake/plugins/check/checkers/api/target/cflags.lua deleted file mode 100644 index df9a34830..000000000 --- a/xmake/plugins/check/checkers/api/target/cflags.lua +++ /dev/null @@ -1,33 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file cflags.lua --- - --- imports -import("core.tool.compiler") -import(".api_checker") - -function main() - api_checker.check_targets("cflags", {check = function(target, value) - local compinst = target:compiler("cc") - if not compinst:has_flags(value) then - return false, string.format("%s: unknown c compiler flag '%s'", compinst:name(), value) - end - return true - end}) -end diff --git a/xmake/plugins/check/checkers/api/target/configfiles.lua b/xmake/plugins/check/checkers/api/target/configfiles.lua deleted file mode 100644 index 5819278c0..000000000 --- a/xmake/plugins/check/checkers/api/target/configfiles.lua +++ /dev/null @@ -1,32 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file configfiles.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("configfiles", {check = function(target, value) - local configfiles = os.files(value) - if not configfiles or #configfiles == 0 then - return false, string.format("configfiles '%s' not found", value) - end - return true - end}) -end diff --git a/xmake/plugins/check/checkers/api/target/cxflags.lua b/xmake/plugins/check/checkers/api/target/cxflags.lua deleted file mode 100644 index 9c8df747a..000000000 --- a/xmake/plugins/check/checkers/api/target/cxflags.lua +++ /dev/null @@ -1,33 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file cxflags.lua --- - --- imports -import("core.tool.compiler") -import(".api_checker") - -function main() - api_checker.check_targets("cxflags", {check = function(target, value) - local compinst = target:compiler("cxx") - if not compinst:has_flags(value) then - return false, string.format("%s: unknown c/c++ compiler flag '%s'", compinst:name(), value) - end - return true - end}) -end diff --git a/xmake/plugins/check/checkers/api/target/cxxflags.lua b/xmake/plugins/check/checkers/api/target/cxxflags.lua deleted file mode 100644 index 6756b07d4..000000000 --- a/xmake/plugins/check/checkers/api/target/cxxflags.lua +++ /dev/null @@ -1,33 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file cxxflags.lua --- - --- imports -import("core.tool.compiler") -import(".api_checker") - -function main() - api_checker.check_targets("cxxflags", {check = function(target, value) - local compinst = target:compiler("cxx") - if not compinst:has_flags(value) then - return false, string.format("%s: unknown c++ compiler flag '%s'", compinst:name(), value) - end - return true - end}) -end diff --git a/xmake/plugins/check/checkers/api/target/exceptions.lua b/xmake/plugins/check/checkers/api/target/exceptions.lua deleted file mode 100644 index 551595e7b..000000000 --- a/xmake/plugins/check/checkers/api/target/exceptions.lua +++ /dev/null @@ -1,26 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file exceptions.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("exceptions", {values = {"none", "cxx", "objc", "no-cxx", "no-objc"}}) -end diff --git a/xmake/plugins/check/checkers/api/target/files.lua b/xmake/plugins/check/checkers/api/target/files.lua deleted file mode 100644 index dfc4eda89..000000000 --- a/xmake/plugins/check/checkers/api/target/files.lua +++ /dev/null @@ -1,32 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file files.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("files", {check = function(target, value) - local files = os.files(value) - if not files or #files == 0 then - return false, string.format("files '%s' not found", value) - end - return true - end}) -end diff --git a/xmake/plugins/check/checkers/api/target/fpmodels.lua b/xmake/plugins/check/checkers/api/target/fpmodels.lua deleted file mode 100644 index 25c6c239b..000000000 --- a/xmake/plugins/check/checkers/api/target/fpmodels.lua +++ /dev/null @@ -1,26 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file fpmodels.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("fpmodels", {values = {"none", "precise", "fast", "strict", "except", "noexcept"}}) -end diff --git a/xmake/plugins/check/checkers/api/target/frameworkdirs.lua b/xmake/plugins/check/checkers/api/target/frameworkdirs.lua deleted file mode 100644 index f21629fe5..000000000 --- a/xmake/plugins/check/checkers/api/target/frameworkdirs.lua +++ /dev/null @@ -1,31 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file frameworkdirs.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("frameworkdirs", {check = function(target, value) - if not os.isdir(value) then - return false, string.format("frameworkdir '%s' not found", value) - end - return true - end}) -end diff --git a/xmake/plugins/check/checkers/api/target/headerfiles.lua b/xmake/plugins/check/checkers/api/target/headerfiles.lua deleted file mode 100644 index 5777f27f8..000000000 --- a/xmake/plugins/check/checkers/api/target/headerfiles.lua +++ /dev/null @@ -1,33 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file headerfiles.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("headerfiles", {check = function(target, value) - value = value:gsub("[()]", "") - local headerfiles = os.files(value) - if not headerfiles or #headerfiles == 0 then - return false, string.format("headerfiles '%s' not found", value) - end - return true - end}) -end diff --git a/xmake/plugins/check/checkers/api/target/includedirs.lua b/xmake/plugins/check/checkers/api/target/includedirs.lua deleted file mode 100644 index 5fcafef0f..000000000 --- a/xmake/plugins/check/checkers/api/target/includedirs.lua +++ /dev/null @@ -1,31 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file includedirs.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("includedirs", {check = function(target, value) - if not os.isdir(value) then - return false, string.format("includedir '%s' not found", value) - end - return true - end}) -end diff --git a/xmake/plugins/check/checkers/api/target/installfiles.lua b/xmake/plugins/check/checkers/api/target/installfiles.lua deleted file mode 100644 index cdf0a927e..000000000 --- a/xmake/plugins/check/checkers/api/target/installfiles.lua +++ /dev/null @@ -1,33 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file installfiles.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("installfiles", {check = function(target, value) - value = value:gsub("[()]", "") - local installfiles = os.files(value) - if not installfiles or #installfiles == 0 then - return false, string.format("installfiles '%s' not found", value) - end - return true - end}) -end diff --git a/xmake/plugins/check/checkers/api/target/kind.lua b/xmake/plugins/check/checkers/api/target/kind.lua deleted file mode 100644 index e84bf890d..000000000 --- a/xmake/plugins/check/checkers/api/target/kind.lua +++ /dev/null @@ -1,26 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file kind.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("kind", {values = {"object", "binary", "static", "shared", "headeronly", "phony"}}) -end diff --git a/xmake/plugins/check/checkers/api/target/languages.lua b/xmake/plugins/check/checkers/api/target/languages.lua deleted file mode 100644 index 9831bc2f5..000000000 --- a/xmake/plugins/check/checkers/api/target/languages.lua +++ /dev/null @@ -1,40 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file languages.lua --- - --- imports -import(".api_checker") - -function main() - local values = { - "ansi", "c89", "c90", "c99", "c11", "c17", "clatest", - "cxx98", "cxx11", "cxx14", "cxx17", "cxx1z", "cxx20", "cxx2a", "cxx23", "cxx2b", "cxxlatest" - } - local languages = {} - for _, value in ipairs(values) do - table.insert(languages, value) - if value:find("xx", 1, true) then - table.insert(languages, (value:gsub("xx", "++"))) - end - if value:startswith("c") then - table.insert(languages, "gnu" .. value:sub(2)) - end - end - api_checker.check_targets("languages", {values = languages}) -end diff --git a/xmake/plugins/check/checkers/api/target/ldflags.lua b/xmake/plugins/check/checkers/api/target/ldflags.lua deleted file mode 100644 index efe176aa5..000000000 --- a/xmake/plugins/check/checkers/api/target/ldflags.lua +++ /dev/null @@ -1,35 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file ldflags.lua --- - --- imports -import("core.tool.compiler") -import(".api_checker") - -function main() - api_checker.check_targets("ldflags", {check = function(target, value) - if target:is_binary() then - local linker = target:linker() - if not linker:has_flags(value) then - return false, string.format("%s: unknown linker flag '%s'", linker:name(), value) - end - end - return true - end}) -end diff --git a/xmake/plugins/check/checkers/api/target/linkdirs.lua b/xmake/plugins/check/checkers/api/target/linkdirs.lua deleted file mode 100644 index 3980f2eae..000000000 --- a/xmake/plugins/check/checkers/api/target/linkdirs.lua +++ /dev/null @@ -1,31 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file linkdirs.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("linkdirs", {check = function(target, value) - if not os.isdir(value) then - return false, string.format("linkdir '%s' not found", value) - end - return true - end}) -end diff --git a/xmake/plugins/check/checkers/api/target/optimize.lua b/xmake/plugins/check/checkers/api/target/optimize.lua deleted file mode 100644 index c8bc6eb60..000000000 --- a/xmake/plugins/check/checkers/api/target/optimize.lua +++ /dev/null @@ -1,26 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file optimize.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("optimize", {values = {"none", "fast", "faster", "fastest", "smallest", "aggressive"}}) -end diff --git a/xmake/plugins/check/checkers/api/target/packages.lua b/xmake/plugins/check/checkers/api/target/packages.lua deleted file mode 100644 index e34f602db..000000000 --- a/xmake/plugins/check/checkers/api/target/packages.lua +++ /dev/null @@ -1,32 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file packages.lua --- - --- imports -import("core.project.project") -import(".api_checker") - -function main() - local packages = {} - local requires = project.required_packages() - if requires then - table.join2(packages, table.orderkeys(requires)) - end - api_checker.check_targets("packages", {values = packages, level = "note"}) -end diff --git a/xmake/plugins/check/checkers/api/target/shflags.lua b/xmake/plugins/check/checkers/api/target/shflags.lua deleted file mode 100644 index bb518015a..000000000 --- a/xmake/plugins/check/checkers/api/target/shflags.lua +++ /dev/null @@ -1,35 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file shflags.lua --- - --- imports -import("core.tool.compiler") -import(".api_checker") - -function main() - api_checker.check_targets("shflags", {check = function(target, value) - if target:is_shared() then - local linker = target:linker() - if not linker:has_flags(value) then - return false, string.format("%s: unknown linker flag '%s'", linker:name(), value) - end - end - return true - end}) -end diff --git a/xmake/plugins/check/checkers/api/target/strip.lua b/xmake/plugins/check/checkers/api/target/strip.lua deleted file mode 100644 index cf14c607b..000000000 --- a/xmake/plugins/check/checkers/api/target/strip.lua +++ /dev/null @@ -1,26 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file strip.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("strip", {values = {"none", "debug", "all"}}) -end diff --git a/xmake/plugins/check/checkers/api/target/symbols.lua b/xmake/plugins/check/checkers/api/target/symbols.lua deleted file mode 100644 index 8f4472a9b..000000000 --- a/xmake/plugins/check/checkers/api/target/symbols.lua +++ /dev/null @@ -1,33 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file symbols.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("symbols", {values = function (target) - local values = {"none", "debug", "hidden", "hidden_cxx"} - if target:is_plat("windows") and (target:has_tool("cc", "cl") or target:has_tool("cxx", "cl")) then - table.insert(values, "edit") - table.insert(values, "embed") - end - return values - end}) -end diff --git a/xmake/plugins/check/checkers/api/target/vectorexts.lua b/xmake/plugins/check/checkers/api/target/vectorexts.lua deleted file mode 100644 index dc6a1a755..000000000 --- a/xmake/plugins/check/checkers/api/target/vectorexts.lua +++ /dev/null @@ -1,26 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file vectorexts.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("vectorexts", {values = {"none", "sse", "sse2", "sse3", "ssse3", "avx", "avx2", "neon"}}) -end diff --git a/xmake/plugins/check/checkers/api/target/version.lua b/xmake/plugins/check/checkers/api/target/version.lua deleted file mode 100644 index e476cd8d4..000000000 --- a/xmake/plugins/check/checkers/api/target/version.lua +++ /dev/null @@ -1,41 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file version.lua --- - --- imports -import("core.base.semver") -import(".api_checker") - -function main() - api_checker.check_targets("version", {check = function(target, value) - local errors - local ok = try { - function() - semver.new(value) - return true - end, - catch { - function (errs) - errors = errs - end - } - } - return ok, errors - end, level = "error"}) -end diff --git a/xmake/plugins/check/checkers/api/target/warnings.lua b/xmake/plugins/check/checkers/api/target/warnings.lua deleted file mode 100644 index 2d2159e91..000000000 --- a/xmake/plugins/check/checkers/api/target/warnings.lua +++ /dev/null @@ -1,26 +0,0 @@ ---!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, TBOOX Open Source Group. --- --- @author ruki --- @file warnings.lua --- - --- imports -import(".api_checker") - -function main() - api_checker.check_targets("warnings", {values = {"none", "less", "more", "all", "allextra", "everything", "error"}}) -end |
