Skip to content

Commit e385bc0

Browse files
author
James Foster
authored
Merge branch 'master' into warnings
2 parents ef47bbf + cf155e7 commit e385bc0

File tree

278 files changed

+476362
-476285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+476362
-476285
lines changed

.gitattributes

+39-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,40 @@
1+
# https://docs.github.com/en/github/using-git/configuring-git-to-handle-line-endings
2+
# https://git-scm.com/docs/gitattributes
3+
# https://git-scm.com/docs/git-config
4+
# https://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/
5+
6+
# Configure this repository to use Git's type detection algorithm to guess
7+
# whether a file is text or binary. Text files will have line endings converted
8+
# as if you had set
9+
# eol=native
10+
# That is, on Windows text files will have CRLF line endings in your working
11+
# directory while on Linux and macOS your text files will have LF line endings
12+
# in your working directory. In either case, they will have LF line endings in
13+
# the Git repository itself.
14+
115
# Set the default behavior, in case people don't have core.autocrlf set.
2-
* text eol=lf
16+
* text=auto
17+
18+
# Explicitly declare text files you want to always be normalized and converted
19+
# to native line endings on checkout. Git would likely get these right, but
20+
# we can be sure by adding them here.
21+
*.ino text diff=cpp
22+
*.c text diff=c
23+
*.cc text diff=cpp
24+
*.cxx text diff=cpp
25+
*.cpp text diff=cpp
26+
*.c++ text diff=cpp
27+
*.hpp text diff=cpp
28+
*.h text diff=c
29+
*.h++ text diff=cpp
30+
*.hh text diff=cpp
31+
32+
*.md text
33+
*.yaml text
34+
*.yml text
35+
36+
37+
# Denote all files that are truly binary and should not be modified.
38+
# Even if we don't have any of these, they make a good example.
39+
*.png binary
40+
*.jpg binary

.github/workflows/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ In this project, we define a workflow for each target platform. **If you're loo
77

88
The reason that all platforms are tested in _this_ project is to ensure that, as a framework, `arduino_ci` will run properly on any developer's personal workstation (regardless of OS).
99

10-
For testing an individual Arduino library in the context of GitHub, [Linux is the cheapest option](https://docs.github.com/en/free-pro-team@latest/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-actions) and produces results identical to the other OSes.
10+
For testing an individual Arduino library in the context of GitHub, [Linux is the cheapest option](https://docs.github.com/en/free-pro-team@latest/github/setting-up-and-managing-billing-and-payments-on-github/about-billing-for-github-actions) and should produce results identical to the other OSes.

.github/workflows/linux.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This is the name of the workflow, visible on GitHub UI
22
name: linux
33

4-
on: [pull_request]
4+
on: [push, pull_request]
55

66
jobs:
77
"unittest_lint_sampleproject":

.github/workflows/macos.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This is the name of the workflow, visible on GitHub UI
22
name: macos
33

4-
on: [pull_request]
4+
on: [push, pull_request]
55

66
jobs:
77
"unittest_lint_sampleproject":

.github/workflows/windows.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This is the name of the workflow, visible on GitHub UI
22
name: windows
33

4-
on: [pull_request]
4+
on: [push, pull_request]
55

66
jobs:
77
"unittest_lint_sampleproject":

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99
### Added
10+
- Show output from successful compile
11+
- `--min-free-space=N` command-line argument to fail if free space is below requred value
1012

1113
### Changed
1214
- Fix copy/paste error to allow additional warnings for a platform
15+
- Properly report compile errors in GitHub Actions (#296)
16+
- Put build artifacts in a separate directory to reduce clutter.
17+
- Change 266 files from CRLF to LF.
18+
- Update .gitattributes so we have consistent line endings
19+
- Run tests on push as well as on a pull request so developers can see impact
1320

1421
### Deprecated
1522

@@ -27,6 +34,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2734

2835
### Changed
2936
- Topmost installtion instructions now suggest `gem install arduino_ci` instead of using a `Gemfile`. Reasons for using a `Gemfile` are listed and discussed separately further down the README.
37+
- Stream::readStreamUntil() no longer returns delimiter
3038

3139
### Removed
3240
- scanning of `library.properties`; this can and should now be performed by the standalone [`arduino-lint` tool](https://arduino.github.io/arduino-lint).

SampleProjects/TestSomething/test/stream.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,16 @@ unittest(stream_parse)
6969

7070
}
7171

72+
unittest(readStringUntil) {
73+
String data = "";
74+
unsigned long micros = 100;
75+
data = "abc:def";
76+
77+
Stream s;
78+
s.mGodmodeDataIn = &data;
79+
s.mGodmodeMicrosDelay = &micros;
80+
// result should not include delimiter
81+
assertEqual("abc", s.readStringUntil(':'));
82+
assertEqual("def", s.readStringUntil(':'));
83+
}
7284
unittest_main()

cpp/arduino/Stream.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class Stream : public Print
186186
ret = String(*mGodmodeDataIn);
187187
mGodmodeDataIn->clear();
188188
} else {
189-
ret = mGodmodeDataIn->substring(0, idxTrm + 1);
189+
ret = mGodmodeDataIn->substring(0, idxTrm);
190190
fastforward(idxTrm + 1);
191191
}
192192
return ret;

0 commit comments

Comments
 (0)