-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use $HOME/.tidyall.ini
if not found tidyall.ini
#5
base: master
Are you sure you want to change the base?
Conversation
Thanks for the patch. I thought about doing this but it ended up not working. tidyall needs to know the "root directory" of your project - to know where to put backups and cache files, and to know where to search for files with options -a/--all and -s/--svn. It only knows the project root directory because the tidyall.ini file is there. Best On Sep 10, 2012, at 10:48 AM, Hyungsuk Hong wrote:
|
current working directory will use to root_dir. + $params{root_dir} = cwd() if $conf_file eq "$ENV{HOME}/.tidyall.ini"; and this patch is working till now at me. :) |
I suppose you could also just keep the .ini file in your home dir and then symlink to it from your individual projects. |
@@ -54,6 +54,7 @@ if ( ( $all_files || $svn_files || $git_files ) ) { | |||
die "cannot use filename(s) with -a/--all, -s/--svn, or -g/--git" | |||
if @ARGV; | |||
$conf_file ||= $tidyall_class->find_conf_file( cwd() ); | |||
$params{root_dir} = cwd() if $conf_file eq "$ENV{HOME}/.tidyall.ini"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just wrong, since the file is either tidyall.ini
(no dot) or .tidyallrc
. You'd need to check for both.
Better to check something like:
... if dirname($conf_file) eq $ENV{HOME};
I think this should check for both I think it does make sense to default to |
first, sorry i have very poor english skills.
so i don't have to write documentation for details.
Test
$HOME/.tidyall.ini
then, go to
some where perl project without tidyall.ini
$ tidyall -a