Humanizr / Humanizer

Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities
Other
8.7k stars 965 forks source link

Feedback on the contributing doc and problem with running build.cmd #494

Closed deap82 closed 9 months ago

deap82 commented 9 years ago

I was about to create my first pull request towards the Humanizer project and I hope I've done it right up to this point (See problem further below). I'm working in Windows with Visual Studio.

There are a few contradictions in the documentation about contributing:

There is a link to this guide, http://scottchacon.com/2011/08/31/github-flow.html [GUIDE A], which talks about branching from master, but Humanizer has a dev branch.

There is a link to this guide, https://gist.github.com/jbenet/ee6c9ac48068889b0912#the-workflow [GUIDE B], that in the end says I shouldn't fork, but of course I have to and the Humanizer doc (Contribution.md) says so. In that regard I find these guides more useful on how to fork and how to sync the fork:

https://help.github.com/articles/fork-a-repo/ https://help.github.com/articles/syncing-a-fork/ (In combination with GUIDE B i figured out how to rebase with "upstream")

Sure, I'm new at working with open source code and pretty new at Git (prefer using Source Tree over command line), but I believe I've understood what pieces I really should take from each guide and not. But it's still a little bit confusing. Do you agree something can be done to improve this documentation?

I would also like to ask:

  1. About "Code adheres to the existing coding standards; e.g. no curlies for one-line blocks, no redundant empty lines between methods or code blocks, spaces rather than tabs, etc." Is there any more doc on this "existing code standard"? I assume it's about following along the current code, but for example the spaces rather than tabs standard I would never have "found" if it wasn't listed here (also, it seems to not be followed everywhere).
  2. What is the difference between running build.cmd and building in Visual Studio? When I tried to run build.cmd the first time I got:
File C:\develop\GIT\Humanizer\build.ps1 cannot be loaded. The file C:\develop\G
IT\Humanizer\build.ps1 is not digitally signed. The script will not execute on
the system. Please see "get-help about_signing" for more details..
At line:1 char:12
+ .\build.ps1 <<<<
    + CategoryInfo          : NotSpecified: (:) [], PSSecurityException
    + FullyQualifiedErrorId : RuntimeException

I then opened Powershell and ran:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted

After that I could run build.cmd but now I got another error message about DNX so I googled and followed this guide: http://blogs.msdn.com/b/sujitdmello/archive/2015/04/23/step-by-step-installation-instructions-for-getting-dnx-on-your-laptop.aspx

Now, when running build.cmd I get a lot of error messages about the Humanizer.Tests.Dnx.xproj, for example:

C:\develop\GIT\Humanizer\Src\Humanizer.Tests.Shared\Localisation\fa\DateHumaniz
eTests.cs(103,65): DNXCore,Version=v5.0 error CS0103: The name 'Tense' does not
 exist in the current context [C:\develop\GIT\Humanizer\Src\Humanizer.Tests.Dnx
\Humanizer.Tests.Dnx.xproj]

However this project is not even included in the solution. So when I build in Visual Studio I get "Build succeded". It seems some information about how the tests for the projects are set up is missing (or I missed it).

My branch can be found here: https://github.com/deap82/Humanizer/tree/SwedishOrdinalizer

I have not created a pull request yet as I haven't managed to run the build.cmd script. Any help and clarification is appreciated.

SimonCropp commented 9 months ago

@deap82 sorry for the much delayed response. these issues should now be resolved.