Merge pull request #613 from Nihlus/cleanup-7-comma-spacing

[Cleanup] Comma spacing
This commit is contained in:
Jarl Gullberg 2017-08-04 11:41:19 +02:00 committed by GitHub
commit ca349145e8
14 changed files with 109 additions and 114 deletions

View file

@ -12,7 +12,7 @@ before_script:
- sleep 3 # give xvfb some time to start - sleep 3 # give xvfb some time to start
script: script:
- ./build.sh NuGet - travis_wait ./build.sh NuGet
after_script: after_script:
- mono --debug --profile=log:coverage,covfilter=+OpenTK,covfilter=-OpenTK.Tests,covfilter=-FSharp.Core,covfilter=-FsCheck,covfilter=-xunit.assert "packages/xunit.runner.console/tools/xunit.console.exe" "tests/OpenTK.Tests/bin/Release/OpenTK.Tests.dll" -parallel none - mono --debug --profile=log:coverage,covfilter=+OpenTK,covfilter=-OpenTK.Tests,covfilter=-FSharp.Core,covfilter=-FsCheck,covfilter=-xunit.assert "packages/xunit.runner.console/tools/xunit.console.exe" "tests/OpenTK.Tests/bin/Release/OpenTK.Tests.dll" -parallel none

View file

@ -662,15 +662,13 @@ namespace Bind
if (f.Parameters.HasGenericParameters) if (f.Parameters.HasGenericParameters)
{ {
sb.Append("<"); sb.Append("<");
foreach (Parameter p in f.Parameters) foreach (Parameter p in f.Parameters.Where(p => p.Generic))
{
if (p.Generic)
{ {
sb.Append(p.CurrentType); sb.Append(p.CurrentType);
sb.Append(", "); sb.Append(", ");
} }
}
sb.Remove(sb.Length - 1, 1); sb.Remove(sb.Length - 2, 2);
sb.Append(">"); sb.Append(">");
} }
@ -679,14 +677,11 @@ namespace Bind
if (f.Parameters.HasGenericParameters) if (f.Parameters.HasGenericParameters)
{ {
sb.AppendLine(); sb.AppendLine();
foreach (Parameter p in f.Parameters) foreach (Parameter p in f.Parameters.Where(p => p.Generic))
{
if (p.Generic)
{ {
sb.AppendLine(String.Format(" where {0} : struct", p.CurrentType)); sb.AppendLine(String.Format(" where {0} : struct", p.CurrentType));
} }
} }
}
return sb.ToString(); return sb.ToString();
} }

View file

@ -7,7 +7,7 @@
<!-- Spacing rules --> <!-- Spacing rules -->
<Rule Id="SA1000" Action="Error" /> <!-- Keywords must be spaced correctly --> <Rule Id="SA1000" Action="Error" /> <!-- Keywords must be spaced correctly -->
<Rule Id="SA1001" Action="None" /> <!-- Commas must be spaced correctly --> <Rule Id="SA1001" Action="Error" /> <!-- Commas must be spaced correctly -->
<Rule Id="SA1002" Action="None" /> <!-- Semicolons must be spaced correctly --> <Rule Id="SA1002" Action="None" /> <!-- Semicolons must be spaced correctly -->
<Rule Id="SA1003" Action="None" /> <!-- Symbols must be spaced correctly --> <Rule Id="SA1003" Action="None" /> <!-- Symbols must be spaced correctly -->
<Rule Id="SA1004" Action="None" /> <!-- Documentation lines must begin with single space --> <Rule Id="SA1004" Action="None" /> <!-- Documentation lines must begin with single space -->