fix trailing space and new line

temporarily disable codespell
This commit is contained in:
hathach
2023-03-17 16:12:49 +07:00
parent 2faad42cb1
commit 3623ba1884
581 changed files with 2553 additions and 2694 deletions

View File

@@ -37,4 +37,3 @@ class Beep < Plugin
end
end
end

View File

@@ -5,7 +5,7 @@ ceedling-bullseye
Plugin for integrating Bullseye code coverage tool into Ceedling projects.
This plugin requires a working license to Bullseye code coverage tools. The tools
must be within the path or the path should be added to the environment in the
must be within the path or the path should be added to the environment in the
`project.yml file`.
## Configuration

View File

@@ -12,4 +12,3 @@ BRANCHES: <%=sprintf(format_string, hash[:coverage][:branches])%>%
% else
BRANCHES: none
% end

View File

@@ -38,7 +38,7 @@ class Bullseye < Plugin
@ceedling[:plugin_manager].pre_compile_execute(arg_hash)
@ceedling[:streaminator].stdout_puts("Compiling #{File.basename(source)} with coverage...")
compile_command =
compile_command =
@ceedling[:tool_executor].build_command_line(
TOOLS_BULLSEYE_COMPILER,
@ceedling[:flaginator].flag_down( OPERATION_COMPILE_SYM, BULLSEYE_SYM, source ),
@@ -48,14 +48,14 @@ class Bullseye < Plugin
coverage_command = @ceedling[:tool_executor].build_command_line(TOOLS_BULLSEYE_INSTRUMENTATION, [], compile_command[:line] )
shell_result = @ceedling[:tool_executor].exec( coverage_command[:line], coverage_command[:options] )
arg_hash[:shell_result] = shell_result
@ceedling[:plugin_manager].post_compile_execute(arg_hash)
end
def post_test_fixture_execute(arg_hash)
result_file = arg_hash[:result_file]
if ((result_file =~ /#{BULLSEYE_RESULTS_PATH}/) and (not @result_list.include?(result_file)))
@result_list << arg_hash[:result_file]
end
@@ -70,13 +70,13 @@ class Bullseye < Plugin
:header => BULLSEYE_ROOT_NAME.upcase,
:results => results
}
@ceedling[:plugin_reportinator].run_test_results_report(hash) do
message = ''
message = 'Unit test failures.' if (results[:counts][:failed] > 0)
message
end
# coverage results
return if (verify_coverage_file() == false)
if (@ceedling[:task_invoker].invoked?(/^#{BULLSEYE_TASK_ROOT}(all|delta)/))
@@ -100,13 +100,13 @@ class Bullseye < Plugin
}
@ceedling[:plugin_reportinator].run_test_results_report(hash)
# coverage results
command = @ceedling[:tool_executor].build_command_line(TOOLS_BULLSEYE_REPORT_COVSRC)
shell_result = @ceedling[:tool_executor].exec(command[:line], command[:options])
report_coverage_results_all(shell_result[:output])
end
def enableBullseye(enable)
if BULLSEYE_AUTO_LICENSE
if (enable)
@@ -117,14 +117,14 @@ class Bullseye < Plugin
@ceedling[:streaminator].stdout_puts("Reverting Bullseye to previous state")
end
args.each do |arg|
args.each do |arg|
command = @ceedling[:tool_executor].build_command_line(TOOLS_BULLSEYE_BUILD_ENABLE_DISABLE, [], arg)
shell_result = @ceedling[:tool_executor].exec(command[:line], command[:options])
end
end
end
private ###################################
def report_coverage_results_all(coverage)
@@ -139,7 +139,7 @@ class Bullseye < Plugin
if (coverage =~ /^Total.*?=\s+([0-9]+)\%/)
results[:coverage][:functions] = $1.to_i
end
if (coverage =~ /^Total.*=\s+([0-9]+)\%\s*$/)
results[:coverage][:branches] = $1.to_i
end
@@ -177,10 +177,10 @@ class Bullseye < Plugin
banner = @ceedling[:plugin_reportinator].generate_banner( "#{BULLSEYE_ROOT_NAME.upcase}: CODE COVERAGE SUMMARY" )
@ceedling[:streaminator].stdout_puts "\n" + banner + "\nNo coverage file.\n\n"
end
return exist
end
end
@@ -188,7 +188,7 @@ end
END {
# cache our input configurations to use in comparison upon next execution
if (@ceedling[:task_invoker].invoked?(/^#{BULLSEYE_TASK_ROOT}/))
@ceedling[:cacheinator].cache_test_config( @ceedling[:setupinator].config_hash )
@ceedling[:cacheinator].cache_test_config( @ceedling[:setupinator].config_hash )
@ceedling[BULLSEYE_SYM].enableBullseye(false)
end
}

View File

@@ -3,7 +3,7 @@ ceedling-colour-report
## Overview
The colour_report replaces the normal ceedling "pretty" output with
The colour_report replaces the normal ceedling "pretty" output with
a colorized variant, in order to make the results easier to read from
a standard command line. This is very useful on developer machines, but
can occasionally cause problems with parsing on CI servers.

View File

@@ -89,4 +89,3 @@ class CommandHooks < Plugin
end
end
end

View File

@@ -9,7 +9,7 @@ In June of 2016, Microsoft with Red Hat and Codenvy got together to create a sta
For C and C++ projects, many people use the `clangd` backend. So that it can do things like "go to definition", `clangd` needs to know how to build the project so that it can figure out all the pieces to the puzzle. There are manual tools such as `bear` which can be run with `gcc` or `clang` to extract this information it has a big limitation in that if run with `ceedling release` you won't get any auto completion for Unity and you'll also get error messages reported by your IDE because of what it perceives as missing headers. If you do the same with `ceedling test` now you get Unity but you might miss things that are only seen in the release build.
This plugin resolves that issue. As it is run by Ceedling, it has access to all the build information it needs to create the perfect `compile_commands.json`. Once enabled, this plugin will generate that file and place it in `./build/artifacts/compile_commands.json`. `clangd` will search your project for this file, but it is easier to symlink it into the root directory (for example `ln -s ./build/artifacts/compile_commands.json`.
This plugin resolves that issue. As it is run by Ceedling, it has access to all the build information it needs to create the perfect `compile_commands.json`. Once enabled, this plugin will generate that file and place it in `./build/artifacts/compile_commands.json`. `clangd` will search your project for this file, but it is easier to symlink it into the root directory (for example `ln -s ./build/artifacts/compile_commands.json`.
For more information on LSP and to find out if your editor supports it, check out https://langserver.org/

View File

@@ -16,4 +16,4 @@ task :integration_test do
end
end
task :default => [:spec, :integration_test]
task :default => [:spec, :integration_test]

View File

@@ -28,7 +28,7 @@
:source:
- src/**
:support:
:defines:
# in order to add common defines:
# 1) remove the trailing [] from the :common: section

View File

@@ -4,4 +4,4 @@
void display_turnOffStatusLed(void)
{
printf("Display: Status LED off");
}
}

View File

@@ -90,7 +90,7 @@ class FffMockGenerator
# In the init function, reset the FFF globals. These are used for things
# like the call history.
output.puts " FFF_RESET_HISTORY();"
# Also, reset all of the fakes.
if parsed_header[:functions]
parsed_header[:functions].each do |function|

View File

@@ -254,7 +254,7 @@ describe "FffMockGenerator.create_mock_header" do
)
end
end
context "when there is a function that returns a const int" do
let(:mock_header){
parsed_header = {}

View File

@@ -146,4 +146,4 @@ describe "FffMockGenerator.create_mock_source" do
)
end
end
end
end

View File

@@ -48,4 +48,4 @@ def create_cmock_style_parsed_header(functions, typedefs = nil)
end
end
parsed_header
end
end

View File

@@ -30,4 +30,4 @@
fff.call_history[order_], \
"Function " #function_ " not called in order " #order_ )
#endif
#endif

View File

@@ -12,4 +12,3 @@ BRANCHES: <%=sprintf(format_string, hash[:coverage][:branches])%>%
% else
BRANCHES: none
% end

View File

@@ -5,7 +5,7 @@ class ReportinatorHelper
def print_shell_result(shell_result)
if !(shell_result.nil?)
puts "Done in %.3f seconds." % shell_result[:time]
if !(shell_result[:output].nil?) && (shell_result[:output].length > 0)
puts shell_result[:output]
end

View File

@@ -3,8 +3,8 @@ json_tests_report
## Overview
The json_tests_report plugin creates a JSON file of test results, which is
handy for Continuous Integration build servers or as input into other
The json_tests_report plugin creates a JSON file of test results, which is
handy for Continuous Integration build servers or as input into other
reporting tools. The JSON file is output to the appropriate
`<build_root>/artifacts/` directory (e.g. `artifacts/test/` for test tasks,
`artifacts/gcov/` for gcov, or `artifacts/bullseye/` for bullseye runs).

View File

@@ -33,7 +33,7 @@ class JsonTestsReport < Plugin
"IgnoredTests" => write_tests(results[:ignores]),
"Summary" => write_statistics(results[:counts])
}
f << JSON.pretty_generate(json)
end
end
@@ -62,7 +62,7 @@ class JsonTestsReport < Plugin
results.each do |result|
result[:collection].each do |item|
@test_counter += 1
retval << {
retval << {
"file" => File.join(result[:source][:path], result[:source][:file]),
"test" => item[:test]
}

View File

@@ -96,7 +96,7 @@ put that corporate copyright notice (or maybe a copyleft notice, if that's your
### Test Defines
You can specify the "#ifdef TEST" at the top of the test files with a custom define.
This example will put a "#ifdef CEEDLING_TEST" at the top of the test files.
This example will put a "#ifdef CEEDLING_TEST" at the top of the test files.
```
:module_generator:
@@ -115,5 +115,3 @@ Your options are as follows:
- `:camel` - camelFilesAreSimilarButStartLow
- `:snake` - snake_case_is_all_lower_and_uses_underscores
- `:caps` - CAPS_FEELS_LIKE_YOU_ARE_SCREAMING

View File

@@ -1,4 +1,4 @@
:module_generator:
:project_root: ./
:source_root: src/
:test_root: test/
:test_root: test/

View File

@@ -3,8 +3,8 @@ ceedling-stdout-gtestlike-tests-report
## Overview
The stdout_gtestlike_tests_report replaces the normal ceedling "pretty" output with
a variant that resembles the output of gtest. This is most helpful when trying to
The stdout_gtestlike_tests_report replaces the normal ceedling "pretty" output with
a variant that resembles the output of gtest. This is most helpful when trying to
integrate into an IDE or CI that is meant to work with google test.
## Setup

View File

@@ -3,7 +3,7 @@ ceedling-stdout-ide-tests-report
## Overview
The stdout_ide_tests_report replaces the normal ceedling "pretty" output with
The stdout_ide_tests_report replaces the normal ceedling "pretty" output with
a simplified variant intended to be easily parseable.
## Setup

View File

@@ -5,7 +5,7 @@ ceedling-pretty-tests-report
The stdout_pretty_tests_report is the default output of ceedling. Instead of
showing most of the raw output of CMock, Ceedling, etc., it shows a simplified
view. It also creates a nice summary at the end of execution which groups the
view. It also creates a nice summary at the end of execution which groups the
results into ignored and failed tests.
## Setup

View File

@@ -56,4 +56,3 @@ IGNORED: <%=sprintf(format_string, ignored)%>
No tests executed.
% end

View File

@@ -2,20 +2,20 @@ require 'ceedling/plugin'
require 'ceedling/defaults'
class StdoutPrettyTestsReport < Plugin
def setup
@result_list = []
@plugin_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
template = @ceedling[:file_wrapper].read(File.join(@plugin_root, 'assets/template.erb'))
@ceedling[:plugin_reportinator].register_test_results_template( template )
end
def post_test_fixture_execute(arg_hash)
return if not (arg_hash[:context] == TEST_SYM)
@result_list << arg_hash[:result_file]
end
def post_build
return if not (@ceedling[:task_invoker].test_invoked?)

View File

@@ -1,9 +1,9 @@
ceedling-subprojects
====================
Plugin for supporting subprojects that are built as static libraries. It continues to support
dependency tracking, without getting confused between your main project files and your
subproject files. It accepts different compiler flags and linker flags, allowing you to
Plugin for supporting subprojects that are built as static libraries. It continues to support
dependency tracking, without getting confused between your main project files and your
subproject files. It accepts different compiler flags and linker flags, allowing you to
optimize for your situation.
First, you're going to want to add the extension to your list of known extensions:
@@ -13,12 +13,12 @@ First, you're going to want to add the extension to your list of known extension
:subprojects: '.a'
```
Define a new section called :subprojects. There, you can list as many subprojects
as you may need under the :paths key. For each, you specify a unique place to build
Define a new section called :subprojects. There, you can list as many subprojects
as you may need under the :paths key. For each, you specify a unique place to build
and a unique name.
```
:subprojects:
:subprojects:
:paths:
- :name: libprojectA
:source:
@@ -27,7 +27,7 @@ and a unique name.
:include:
- ./subprojectA/include/dir
:build_root: ./subprojectA/build/dir
:defines:
:defines:
- DEFINE_JUST_FOR_THIS_FILE
- AND_ANOTHER
- :name: libprojectB

View File

@@ -73,6 +73,5 @@ SUBPROJECTS_PATHS.each do |subproj|
task :directories => subproj_directories.clone
# Finally, add the static library to our RELEASE build dependency list
task RELEASE_SYM => ["#{subproj_build_root}/#{subproj_name}#{EXTENSION_SUBPROJECTS}"]
task RELEASE_SYM => ["#{subproj_build_root}/#{subproj_name}#{EXTENSION_SUBPROJECTS}"]
end

View File

@@ -3,7 +3,7 @@ ceedling-teamcity-tests-report
## Overview
The teamcity_tests_report replaces the normal ceedling "pretty" output with
The teamcity_tests_report replaces the normal ceedling "pretty" output with
a version that has results tagged to be consumed with the teamcity CI server.
## Setup