Ruby uses a magic comment in the first line of the file to specify the encoding of the file. Otherwise ASCII is assumed.
To specify utf8, a comment like this is put into the first line of the source file:
# -*- coding: utf-8 -*-
When running pod lib lint on this, a warning is issued and the lint fails. This is the output:
pod lib lint
$ pod lib lint
-> Pixltag (0.1.0)
- WARN | Comments placed at the top of the specification must be deleted.
[!] Pixltag did not pass validation.
You can use the `--no-clean` option to inspect any issue.
I don't think this is very helpful. Non-ascii names are impossible to use then.
we can probably remove that comment check pretty soon entirely with the upcoming specs repo changes.
It shouldn’t even matter in the case of a podspec, as we don’t use require/load. Instead we always read the file as UTF-8 and then eval the source.
Did you encounter a real problem?
My editor, emacs, inserts an encoding comment there automatically when editing ruby. If you choose to out rule that and only accept an arbitrary subset of ruby syntax with your linter, that's your design choice.
@febeling I see. I guess what @orta says makes sense, we can soon remove the check anyways.
[Spec::Linter] Remove comments check