This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Unity files | |
*.unity -text merge=unityyamlmerge diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class IfExtensions | |
{ | |
public static void IfTrue(this bool condition, Action action) | |
{ | |
if(condition) action(); | |
} | |
public static bool IfTrue(this bool condition, Func<bool> func) | |
{ | |
if(condition) return func(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<RuleSet Name="Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. It is recommended to include this rule set in any custom rule set you create for your projects." ToolsVersion="16.0"> | |
<Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized"> | |
<Name Resource="MinimumRecommendedRules_Name" /> | |
<Description Resource="MinimumRecommendedRules_Description" /> | |
</Localization> | |
<Include Path=".sonarlint\bimvisualizercsharp.ruleset" Action="Default" /> | |
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed"> | |
<Rule Id="CA1001" Action="Warning" /> | |
<Rule Id="CA1009" Action="Warning" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$localBranches = git branch --no-color --format="%(refname:short)" -l | |
$remoteBranches = git branch --no-color --format="%(refname:short)" -r | |
$branchSummary = ($localBranches | Where-Object { $remoteBranches -contains ("origin/" + $_)} | ForEach-Object { | |
$name = $_ | |
[pscustomobject]@{name = "$name"; diff = git rev-list "$name...origin/$name" --oneline --left-right} | |
} | Where-Object {$_.diff.Length -gt 0} | ForEach-Object { | |
$name = $_.name | |
$incoming = ($_.diff | Where-Object { $_.StartsWith(">")}).Length | |
$outgoing = ($_.diff | Where-Object { $_.StartsWith("<")}).Length |
Participants:
- origin: Main repository. This is a remote repository.
- work1: Main working repository.
- mirror: The 'sync' repository between work1 and work2. This is a bare repository with no remotes. It is accessible from work1 and work2
- work2: The secondary working repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo $1 $2 | |
while read local_ref local_sha remote_ref remote_sha | |
do | |
echo $local_ref $local_sha $remote_ref $remote_sha | |
invalid_message=$(git log --pretty=%s $remote_sha..$local_sha | grep 'fixup\|WIP') | |
if [ -n "$invalid_message" ]; then | |
echo "error: A commit szövege invalid kifejezést tartalmaz:" |