Skip to content

Commit

Permalink
Make whitespace for braces strict
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed Jan 26, 2017
1 parent eba6be3 commit 9d00be5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tools/kompos/src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ export class Controller {
msg, this.dbg.getSourceId(msg.stack[0].sourceSection.uri));
}

onSymbolMessage(msg: SymbolMessage){
onSymbolMessage(msg: SymbolMessage) {
updateStrings(msg);
}

onTracingData(data: DataView){
onTracingData(data: DataView) {
updateData(data);
displayMessageHistory();
}
Expand Down
12 changes: 6 additions & 6 deletions tools/kompos/src/history-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class HistoryData {
private strings = {};
private currentReceiver = "";

constructor(){
constructor() {
this.addActor("0:0", "Platform"); // add main actor
}

Expand All @@ -32,7 +32,7 @@ export class HistoryData {
this.actors[id.toString()] = node;
}

addStrings(ids: number[], strings: string[]){
addStrings(ids: number[], strings: string[]) {
for (let i = 0; i < ids.length; i++) {
this.strings[ids[i].toString()] = strings[i];
}
Expand Down Expand Up @@ -79,12 +79,12 @@ export class HistoryData {
return this.maxMessageCount;
}

updateDataBin(data: DataView){
updateDataBin(data: DataView) {
let i = 0;
while(i < data.byteLength){
while (i < data.byteLength) {
const typ = data.getInt8(i);
i++;
switch(typ){
switch (typ) {
case 1:
const aid = (data.getInt32(i + 4) + ":" + data.getInt32(i));
// 8 byte causal message id
Expand Down Expand Up @@ -158,7 +158,7 @@ export class HistoryData {

function readParameter(dv: DataView, offset: number): number {
const paramType = dv.getInt8(offset);
switch(paramType){
switch (paramType) {
case 0: // false
return 1;
case 1: // true
Expand Down
2 changes: 1 addition & 1 deletion tools/kompos/src/visualizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function updateStrings(msg: SymbolMessage) {
data.addStrings(msg.ids, msg.symbols);
}

export function updateData(dv: DataView){
export function updateData(dv: DataView) {
data.updateDataBin(dv);
}

Expand Down
2 changes: 2 additions & 0 deletions tools/kompos/tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"no-duplicate-variable": true,
"no-trailing-whitespace": true,
"no-var-keyword": true,
"one-line": [true, "check-catch", "check-finally", "check-else",
"check-open-brace", "check-whitespace"],
"whitespace": [
"check-branch",
"check-decl",
Expand Down

0 comments on commit 9d00be5

Please sign in to comment.