Closed laurisb closed 10 years ago
/[A-Z].+file/
is fairly common in Ruby-land e.g. Gemfile
, Vagrantfile
.
Default syntax highlighting is a pain you're right, though most editors and IDEs will allow you to assign it fairly easily, for example with vim:
au BufNewFile,BufRead Taskfile set filetype=php
Very early versions of Task allowed you pass the path to the Taskfile
as a CLI argument, and it may be worth reviving that feature.
I think it should be Taskfile
, but I'll try and rustle up some more opinions and see if there's a consensus!
M
I get the point about highlighting, adding Taskfile to your syntax highlighting config is a bit of a pain for some.
Also could there be a security consideration, what if the server had a vulnerability that allowed plain text files were just outputted to the client, but .php files still got parsed and instead returned a empty response or a error that didn't include your actual code?
Edit:
Also don't think calling it Taskfile.php
or taskfile.php
will make much difference? We should be able to detect both easily enough.
@aranw would Taskfile.php
vs taskfile.php
be partly filesystem dependant? E.g. OS X is case insensitive by default. Not sure how PHP handles it.
M
@mbfisher Yeah, also shell dependent I believe. Like my Zsh I believe can autocorrect
@aranw Re: syntax highlighting and execution, a Shebang would help that. Most editiors pick up on them and syntax highlight accordingly. See http://en.wikipedia.org/wiki/Shebang_(Unix).
Re: security concerns, you shouldn't be deploying the file to live. Simple. It's not essential to the application post build, so remove it.
@stephenmelrose +1 on not including Taskfile
in deployables.
Supporting a few options can't hurt; Taskfile
, taskfile
and taskfile.php
seem to be the winners, though Taskfile
should be the default.
It would be fairly trivial to implement; @laurisb do you fancy submitting a PR against the CLI package, seen as it was your idea? You can do cross-repository issue references with user/repo#issue
(see this blog post).
M
Done. Thanks for cross-repository issue referencing tip, didn't know that.
For consistency it will be better if filename is lowercased like we used to with other tools, such as phpunit.xml, composer.json etc.
And if file has no extension, then people who see this for the first time, does not know without opening what's inside. Also code highlighting will not work by default in most editors / IDEs.