Skip to content

Commit 7c045ad

Browse files
cmaglieper1234
andcommitted
Apply suggestions from code review
Co-authored-by: per1234 <[email protected]>
1 parent 8d78ae0 commit 7c045ad

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

Diff for: arduino/sketch/profiles.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type Project struct {
3535
DefaultProfile string `yaml:"default_profile"`
3636
}
3737

38-
// AsYaml outputs the project file as Yaml
38+
// AsYaml outputs the sketch project file as YAML
3939
func (p *Project) AsYaml() string {
4040
res := "profiles:\n"
4141
for _, profile := range p.Profiles {

Diff for: arduino/sketch/sketch.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func New(path *paths.Path) (*Sketch, error) {
101101
if projectFile.Exist() {
102102
prj, err := LoadProjectFile(projectFile)
103103
if err != nil {
104-
return nil, fmt.Errorf("%s %w", tr("error loading project file:"), err)
104+
return nil, fmt.Errorf("%s %w", tr("error loading sketch project file:"), err)
105105
}
106106
sketch.Project = prj
107107
}

Diff for: docs/sketch-project-file.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ profiles:
9999

100100
### Building a sketch
101101

102-
When a `sketch.yaml` file exists in the sketch, it can be leveraged to compile the sketch with the `--profile/-m` flag
103-
in the `compile` command:
102+
When a sketch project file is present, it can be leveraged to compile the sketch with the `--profile/-m` flag in the
103+
`compile` command:
104104

105105
```
106106
arduino-cli compile --profile nanorp

Diff for: docs/sketch-specification.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ the `data` folder, so any non-code files outside the `data` folder are stripped.
6666

6767
### Metadata
6868

69+
#### `sketch.json`
70+
6971
Arduino CLI and Arduino Web Editor use a file named sketch.json, located in the sketch root folder, to store sketch
7072
metadata.
7173

@@ -79,13 +81,14 @@ The `included_libs` key defines the library versions the Arduino Web Editor uses
7981
Arduino Web Editor specific because all versions of all the Library Manager libraries are pre-installed in Arduino Web
8082
Editor, while only one version of each library may be installed when using the other Arduino development software.
8183

82-
### Sketch project file
84+
#### Sketch project file
8385

8486
This is an optional file named `sketch.yaml`, located in the root folder of the sketch.
8587

86-
Inside `sketch.yaml` the user can define one or more "profiles": each profile is a description of all the resources
87-
needed to build the sketch (platform and libraries each pinned to a specific version). For more information see the
88-
[sketch project file](sketch-project-file.md) documentation.
88+
Inside the sketch project file the user can define one or more "profiles": each profile is a description of all the
89+
resources needed to build the sketch (platform and libraries each pinned to a specific version).
90+
91+
For more information see the [sketch project file](sketch-project-file.md) documentation.
8992

9093
### Secrets
9194

0 commit comments

Comments
 (0)