1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 09:02:55 +08:00

Merge pull request #598 from huoyaoyuan/code-sanity-update

Update CodeFileSanity.
This commit is contained in:
Dean Herbert 2017-04-06 18:22:47 +09:00 committed by GitHub
commit 7b7c0733d1
43 changed files with 74 additions and 74 deletions

View File

@ -10,7 +10,7 @@ install:
- cmd: git submodule update --init --recursive
- cmd: choco install resharper-clt -y
- cmd: choco install nvika -y
- cmd: appveyor DownloadFile https://github.com/peppy/CodeFileSanity/releases/download/v0.1/CodeFileSanity.exe
- cmd: appveyor DownloadFile https://github.com/peppy/CodeFileSanity/releases/download/v0.2.2/CodeFileSanity.exe
before_build:
- cmd: CodeFileSanity.exe
- cmd: nuget restore

@ -1 +1 @@
Subproject commit 0d6dc294738d433999c6c68ff61169d3a8e6ce5f
Subproject commit 0cba3cbc167cfe94e07fe5b629c925e190be939e

View File

@ -4,7 +4,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("osu.Desktop.Deploy")]
@ -16,8 +16,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@ -27,11 +27,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]

View File

@ -16,7 +16,7 @@ namespace osu.Desktop.VisualTests.Beatmaps
}
private readonly Beatmap beatmap;
protected override Beatmap GetBeatmap() => beatmap;
protected override Texture GetBackground() => null;
protected override Track GetTrack() => null;

View File

@ -15,7 +15,7 @@ namespace osu.Desktop.VisualTests.Platform
public TestStorage(string baseName) : base(baseName)
{
}
public override SQLiteConnection GetDatabase(string name)
{
ISQLitePlatform platform;

View File

@ -106,7 +106,7 @@ namespace osu.Desktop.VisualTests.Tests
ScrollTime = scroll_time
}));
}
private void addDrumRoll(bool strong, double duration = default_duration)
{
addBarLine(true);

View File

@ -4,7 +4,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("osu!lazer")]
@ -16,8 +16,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

View File

@ -4,7 +4,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("osu.Game.Modes.Catch")]
@ -16,8 +16,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@ -27,11 +27,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]

View File

@ -4,7 +4,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("osu.Game.Modes.Mania")]
@ -16,8 +16,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@ -27,11 +27,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]

View File

@ -32,7 +32,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Connections
Colour = Color4.White.Opacity(0.2f),
Radius = 4,
};
Children = new Drawable[]
{
new Box

View File

@ -57,7 +57,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
Judgement.Score = Tracking ? OsuScoreResult.SliderTick : OsuScoreResult.Miss;
}
}
protected override void UpdatePreemptState()
{
var animIn = Math.Min(150, sliderTick.StartTime - FadeInTime);

View File

@ -4,7 +4,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("osu.Game.Mode.Osu")]
@ -16,8 +16,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@ -27,11 +27,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]

View File

@ -72,7 +72,7 @@ namespace osu.Game.Modes.Taiko.Beatmaps
double speedAdjustment = beatmap.TimingInfo.SpeedMultiplierAt(obj.StartTime);
double speedAdjustedBeatLength = beatmap.TimingInfo.BeatLengthAt(obj.StartTime) * speedAdjustment;
// The true distance, accounting for any repeats. This ends up being the drum roll distance later
double distance = distanceData.Distance * repeats * legacy_velocity_multiplier;

View File

@ -4,7 +4,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("osu.Game.Modes.Taiko")]
@ -16,8 +16,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@ -27,11 +27,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]

View File

@ -19,7 +19,7 @@ namespace osu.Game.Modes.Taiko.UI
/// Diameter of normal hit object circles.
/// </summary>
private const float normal_diameter = TaikoHitObject.CIRCLE_RADIUS * 2;
/// <summary>
/// Diameter of strong hit object circles.
/// </summary>

View File

@ -60,7 +60,7 @@ namespace osu.Game.Modes.Taiko.UI
/// The key to be used for the rim of the half-drum.
/// </summary>
public Key RimKey;
/// <summary>
/// The key to be used for the centre of the half-drum.
/// </summary>

View File

@ -97,7 +97,7 @@ namespace osu.Game.Tests.Beatmaps.IO
ensureLoaded(osu);
Assert.IsTrue(File.Exists(temp));
File.Delete(temp);
Assert.IsFalse(File.Exists(temp));

View File

@ -69,7 +69,7 @@ namespace osu.Game.Beatmaps.Drawables
GainedSelection = headerGainedSelection,
RelativeSizeAxes = Axes.X,
};
BeatmapSet.Beatmaps = BeatmapSet.Beatmaps.OrderBy(b => b.StarDifficulty).ToList();
BeatmapPanels = BeatmapSet.Beatmaps.Select(b => new BeatmapPanel(b)
{

View File

@ -40,7 +40,7 @@ namespace osu.Game.Beatmaps
protected abstract Beatmap GetBeatmap();
protected abstract Texture GetBackground();
protected abstract Track GetTrack();
private Beatmap beatmap;
private readonly object beatmapLock = new object();
public Beatmap Beatmap
@ -53,7 +53,7 @@ namespace osu.Game.Beatmaps
}
}
}
private readonly object backgroundLock = new object();
private Texture background;
public Texture Background
@ -87,7 +87,7 @@ namespace osu.Game.Beatmaps
if (track != null && BeatmapInfo.AudioEquals(other.BeatmapInfo))
other.track = track;
}
public virtual void Dispose()
{
track?.Dispose();

View File

@ -13,7 +13,7 @@ namespace osu.Game.Configuration
protected override void InitialiseDefaults()
{
#pragma warning disable CS0612 // Type or member is obsolete
Set(OsuConfig.Username, string.Empty);
Set(OsuConfig.Token, string.Empty);

View File

@ -104,7 +104,7 @@ namespace osu.Game.Database
score.Replay = score.CreateReplay(reader);
}
}
return score;
}
}

View File

@ -56,8 +56,8 @@ namespace osu.Game.Graphics.Containers
{
base.Update();
if (parallaxEnabled)
{
if (parallaxEnabled)
{
Vector2 offset = input.CurrentState.Mouse == null ? Vector2.Zero : ToLocalSpace(input.CurrentState.Mouse.NativeState.Position) - DrawSize / 2;
content.MoveTo(offset * ParallaxAmount, firstUpdate ? 0 : 1000, EasingTypes.OutQuint);
content.Scale = new Vector2(1 + ParallaxAmount);

View File

@ -109,7 +109,7 @@ namespace osu.Game.Modes.Objects
// "toFlatten" contains all the curves which are not yet approximated well enough.
// We use a stack to emulate recursion without the risk of running into a stack overflow.
// (More specifically, we iteratively and adaptively refine our curve with a
// (More specifically, we iteratively and adaptively refine our curve with a
// <a href="https://en.wikipedia.org/wiki/Depth-first_search">Depth-first search</a>
// over the tree resulting from the subdivisions we make.)
toFlatten.Push(controlPoints.ToArray());

View File

@ -66,7 +66,7 @@ namespace osu.Game.Modes.Objects
double dir = 1;
double thetaRange = thetaEnd - thetaStart;
// Decide in which direction to draw the circle, depending on which side of
// Decide in which direction to draw the circle, depending on which side of
// AC B lies.
Vector2 orthoAtoC = c - a;
orthoAtoC = new Vector2(orthoAtoC.Y, -orthoAtoC.X);

View File

@ -26,7 +26,7 @@ namespace osu.Game.Modes.UI
reapplySize();
}
}
public new Color4 Colour
{
get
@ -38,7 +38,7 @@ namespace osu.Game.Modes.UI
background.Colour = value;
}
}
public FontAwesome Icon
{
get

View File

@ -70,7 +70,7 @@ namespace osu.Game.Overlays.Options
},
});
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{

View File

@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Options.Sections.General
public class LanguageOptions : OptionsSubsection
{
protected override string Header => "Language";
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{

View File

@ -10,7 +10,7 @@ namespace osu.Game.Overlays.Options.Sections.Graphics
public class SongSelectGraphicsOptions : OptionsSubsection
{
protected override string Header => "Song Select";
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{

View File

@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Options.Sections.Online
public class NotificationsOptions : OptionsSubsection
{
protected override string Header => "Notifications";
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{

View File

@ -11,7 +11,7 @@ namespace osu.Game.Overlays.Options.Sections.Online
public class PrivacyOptions : OptionsSubsection
{
protected override string Header => "Privacy";
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{

View File

@ -15,7 +15,7 @@ namespace osu.Game.Overlays.Options.Sections
{
public override string Header => "Skin";
public override FontAwesome Icon => FontAwesome.fa_paint_brush;
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{

View File

@ -47,7 +47,7 @@ namespace osu.Game.Overlays.Options
}
private ScheduledDelegate expandEvent;
protected override bool OnHover(InputState state)
{
expandEvent = Scheduler.AddDelayed(() =>
@ -57,7 +57,7 @@ namespace osu.Game.Overlays.Options
}, 750);
return true;
}
protected override void OnHoverLost(InputState state)
{
expandEvent?.Cancel();

View File

@ -25,7 +25,7 @@ namespace osu.Game.Overlays
public const float SIDEBAR_WIDTH = Sidebar.DEFAULT_WIDTH;
private const float width = 400;
private const float sidebar_padding = 10;
private ScrollContainer scrollContainer;
@ -118,7 +118,7 @@ namespace osu.Game.Overlays
).ToArray()
}
};
scrollContainer.Padding = new MarginPadding { Top = game?.Toolbar.DrawHeight ?? 0 };
}

View File

@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Toolbar
private ToolbarModeButton activeButton;
public Action<PlayMode> OnPlayModeChange;
public ToolbarModeSelector()
{
RelativeSizeAxes = Axes.Y;

View File

@ -4,7 +4,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("osu!main")]
@ -16,8 +16,8 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@ -27,11 +27,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]

View File

@ -43,7 +43,7 @@ namespace osu.Game.Screens.Select
new BeatmapDetailAreaTabControl
{
RelativeSizeAxes = Axes.X,
OnFilter = (tab, mods) =>
OnFilter = (tab, mods) =>
{
switch (tab)
{

View File

@ -74,7 +74,7 @@
<Compile Include="Audio\SampleInfo.cs" />
<Compile Include="Beatmaps\Drawables\BeatmapBackgroundSprite.cs" />
<Compile Include="Beatmaps\DifficultyCalculator.cs" />
<Compile Include="Beatmaps\IBeatmapCoverter.cs" />
<Compile Include="Beatmaps\IBeatmapConverter.cs" />
<Compile Include="Beatmaps\IBeatmapProcessor.cs" />
<Compile Include="Beatmaps\Legacy\LegacyBeatmap.cs" />
<Compile Include="Beatmaps\Timing\TimeSignatures.cs" />
@ -180,7 +180,7 @@
<Compile Include="Screens\Backgrounds\BackgroundScreenEmpty.cs" />
<Compile Include="Screens\Charts\ChartInfo.cs" />
<Compile Include="Screens\Edit\Editor.cs" />
<Compile Include="Screens\GameScreenWhiteBox.cs" />
<Compile Include="Screens\ScreenWhiteBox.cs" />
<Compile Include="Screens\Loader.cs" />
<Compile Include="Screens\Menu\Button.cs" />
<Compile Include="Screens\Menu\Disclaimer.cs" />
@ -208,7 +208,7 @@
<Compile Include="Screens\Select\Filter\GroupMode.cs" />
<Compile Include="Screens\Select\Filter\SortMode.cs" />
<Compile Include="Screens\Select\MatchSongSelect.cs" />
<Compile Include="Screens\OsuGameScreen.cs" />
<Compile Include="Screens\OsuScreen.cs" />
<Compile Include="Beatmaps\Drawables\BeatmapGroup.cs" />
<Compile Include="Beatmaps\Drawables\BeatmapPanel.cs" />
<Compile Include="Screens\Play\Player.cs" />
@ -282,7 +282,7 @@
<Compile Include="Database\BeatmapSetInfo.cs" />
<Compile Include="Database\BeatmapMetadata.cs" />
<Compile Include="Database\BeatmapInfo.cs" />
<Compile Include="Database\BaseDifficulty.cs" />
<Compile Include="Database\BeatmapDifficulty.cs" />
<Compile Include="Database\DatabaseWorkingBeatmap.cs" />
<Compile Include="Graphics\UserInterface\OsuButton.cs" />
<Compile Include="Overlays\Options\Sections\MaintenanceSection.cs" />
@ -346,7 +346,7 @@
<Compile Include="Overlays\Dialog\PopupDialog.cs" />
<Compile Include="Graphics\UserInterface\DialogButton.cs" />
<Compile Include="Overlays\Dialog\PopupDialogButton.cs" />
<Compile Include="Overlays\Dialog\PopupDialogOKButton.cs" />
<Compile Include="Overlays\Dialog\PopupDialogOkButton.cs" />
<Compile Include="Overlays\Dialog\PopupDialogCancelButton.cs" />
<Compile Include="Screens\Select\BeatmapDeleteDialog.cs" />
<Compile Include="Overlays\DialogOverlay.cs" />
@ -363,7 +363,7 @@
<Compile Include="Screens\Select\Leaderboards\DrawableRank.cs" />
<Compile Include="Graphics\UserInterface\OsuTabControl.cs" />
<Compile Include="Screens\Select\BeatmapDetailArea.cs" />
<Compile Include="Graphics\UserInterface\OsuTabControlCheckBox.cs" />
<Compile Include="Graphics\UserInterface\OsuTabControlCheckbox.cs" />
<Compile Include="Screens\Select\BeatmapDetailAreaTabControl.cs" />
</ItemGroup>
<ItemGroup>