Code formatting. Remove traces of static analysis in drone build
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Jens True 2021-07-03 23:12:20 +02:00
parent 15bedb0c31
commit 8d10da3cc6
7 changed files with 56 additions and 54 deletions

@ -5,13 +5,3 @@ steps:
image: mono image: mono
commands: commands:
- msbuild Tidstagning.sln - msbuild Tidstagning.sln
- name: sca
image: azimarev/mono-sonarqube-scanner
failure: ignore
commands:
- mono /opt/sonar-scanner-msbuild/SonarScanner.MSBuild.exe begin /k:"tidstagning" /d:sonar.host.url="https://sonarqube.jcktrue.dk" /d:sonar.login="$TOKEN"
- msbuild Tidstagning.sln
- mono /opt/sonar-scanner-msbuild/SonarScanner.MSBuild.exe sonarscanner end /d:sonar.login="$TOKEN"
environment:
TOKEN:
from_secret: SONARQUBE_TOKEN

@ -7,7 +7,8 @@ namespace Tidstagning
public partial class Form1 : Form public partial class Form1 : Form
{ {
delegate void SetTextCallback(string text); delegate void SetTextCallback(string text);
BindingList<Entry> entries = new BindingList<Entry> { BindingList<Entry> entries = new BindingList<Entry>
{
}; };
ResultList liste; ResultList liste;
@ -28,7 +29,8 @@ namespace Tidstagning
comboSoundTime.SelectedIndex = 0; comboSoundTime.SelectedIndex = 0;
foreach (string port in Relay.GetPorts()) { foreach (string port in Relay.GetPorts())
{
comboComport.Items.Add(port); comboComport.Items.Add(port);
} }
@ -90,7 +92,8 @@ namespace Tidstagning
grid.CurrentCell = null; grid.CurrentCell = null;
entries.RemoveAt(e.RowIndex); entries.RemoveAt(e.RowIndex);
} }
if (e.RowIndex >= 0 && e.ColumnIndex == grid.Columns["Complete"].Index) { if (e.RowIndex >= 0 && e.ColumnIndex == grid.Columns["Complete"].Index)
{
entries[e.RowIndex].Complete(); entries[e.RowIndex].Complete();
liste.WriteComplete(entries[e.RowIndex]); liste.WriteComplete(entries[e.RowIndex]);

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading;
using System.Diagnostics; using System.Diagnostics;
using System.Threading;
namespace Tidstagning namespace Tidstagning
{ {
@ -31,7 +31,8 @@ namespace Tidstagning
procedure_handle.Dispose(); procedure_handle.Dispose();
} }
public void addEntry(string input) { public void addEntry(string input)
{
string input_filtered = input.Trim(); string input_filtered = input.Trim();
if (input_filtered.Length > 0) if (input_filtered.Length > 0)
{ {

@ -1,8 +1,8 @@
using System.IO.Ports; using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading;
using System.Diagnostics; using System.Diagnostics;
using System.IO.Ports;
using System.Threading;
namespace Tidstagning namespace Tidstagning
{ {
class Relay class Relay
@ -61,7 +61,8 @@ namespace Tidstagning
} }
} }
private void Set(int output, byte state) { private void Set(int output, byte state)
{
byte[] command = { 0xff, 0x01, state }; byte[] command = { 0xff, 0x01, state };
if (com.IsOpen) if (com.IsOpen)
{ {
@ -69,7 +70,8 @@ namespace Tidstagning
com.Write(command, 0, 3); com.Write(command, 0, 3);
} }
} }
public void Close() { public void Close()
{
if (com.IsOpen) if (com.IsOpen)
{ {
Off(); //Make sure the horn is off before closing the com port... Off(); //Make sure the horn is off before closing the com port...

@ -26,7 +26,8 @@ namespace Tidstagning
return filename; return filename;
} }
public void WriteHeader(string header) { public void WriteHeader(string header)
{
this.racenumber = header; this.racenumber = header;
Write("----------------------------"); Write("----------------------------");
Write(header); Write(header);

@ -1,4 +1,5 @@
namespace Tidstagning.Properties { namespace Tidstagning.Properties
{
// This class allows you to handle specific events on the settings class: // This class allows you to handle specific events on the settings class:
@ -6,9 +7,11 @@
// The PropertyChanged event is raised after a setting's value is changed. // The PropertyChanged event is raised after a setting's value is changed.
// The SettingsLoaded event is raised after the setting values are loaded. // The SettingsLoaded event is raised after the setting values are loaded.
// The SettingsSaving event is raised before the setting values are saved. // The SettingsSaving event is raised before the setting values are saved.
internal sealed partial class Settings { internal sealed partial class Settings
{
public Settings() { public Settings()
{
// // To add event handlers for saving and changing settings, uncomment the lines below: // // To add event handlers for saving and changing settings, uncomment the lines below:
// //
// this.SettingChanging += this.SettingChangingEventHandler; // this.SettingChanging += this.SettingChangingEventHandler;
@ -17,11 +20,13 @@
// //
} }
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e)
{
// Add code to handle the SettingChangingEvent event here. // Add code to handle the SettingChangingEvent event here.
} }
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e)
{
// Add code to handle the SettingsSaving event here. // Add code to handle the SettingsSaving event here.
} }
} }