← Back to issue list

snapcraft init doesn't finish the yaml with an empty line

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1660880
Type
issue
State
closed
Author
~elopio
Labels
bitesize ui
Created
Updated
Closed

Current evaluation

Resolved by merged PR snapcraft#1275 (commit 34f45ef2d), which added a trailing newline to snapcraft.yaml files generated by snapcraft init.

Resolution: closed resolved

Reason: The issue was fixed by PR #1275, merged as commit 34f45ef2d; the maintainer linked that PR as the resolution.

Evaluated by: mr-cal-bot

No scores available.

Issue body

It is nice to always finish the source code files with an empty line. The snapcraft.yaml we get after calling snapcraft init doesn't finish with an empty line. $ snapcraft init $ cat snap/snapcraft.yaml name: my-snap-name # you probably want to 'snapcraft register <name>' version: '0.1' # just for humans, typically '1.2+git' or '1.3.2' summary: Single-line elevator pitch for your amazing snap # 79 char long summary description: | This is my-snap's description. You have a paragraph or two to tell the most important story about your snap. Keep it under 100 words though, we live in tweetspace and your description wants to look good in the snap store. grade: devel # must be 'stable' to release into candidate/stable channels confinement: devmode # use 'strict' once you have the right plugs and slots parts: my-part: # See 'snapcraft plugins' plugin: nilelopio@ubuntu-xenial:~/test$

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Resolved by merged PR snapcraft#1275 (commit 34f45ef2d), which added a trailing newline to snapcraft.yaml files generated by snapcraft init.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #1275, which added a trailing newline to snapcraft.yaml files generated by snapcraft init.
stealth/space-bunny-alpha — closed resolved Fixed by adding a trailing newline to snapcraft.yaml generated by snapcraft init in merged commit 34f45ef2d (PR #1275).
qwen/qwen3.6-35b-a3b — — Closed and resolved by updating snapcraft init to append a trailing newline to the generated snapcraft.yaml, meeting standard source file formatting requirements.
qwen/qwen3.6-35b-a3b — — Closed. The missing trailing newline in generated snapcraft.yaml was fixed. The update ensures generated files adhere to standard formatting conventions.
qwen/qwen3.6-35b-a3b — — Resolved by updating snapcraft init to append a trailing newline to generated snapcraft.yaml, ensuring compliance with standard source code formatting practices.
qwen3.6-35b-a3b-mtp-q6 — — Resolved by updating snapcraft init to append a trailing newline to the generated snapcraft.yaml file.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft#1275 (confidence 99%)

    Merged as commit 34f45ef2d and changed the init template to append a final newline.

Related issues

Issue Project State Summary Similarity
#1604326 snapcraft init doesn't fail if there is a .snapcraft.yaml file snapcraft (launchpad) closed Fixed by merged snapcraft#669 (commit 2cd727259): snapcraft init now detects an existing .snapcraft.yaml and fails instead of creating snapcraft.yaml.
74%