HackerExperience / Helix

GNU Affero General Public License v3.0
53 stars 10 forks source link

Add Virus #365

Closed renatomassaro closed 6 years ago

renatomassaro commented 6 years ago

Probably on another PRs:

Incidental


This change is Reviewable

renatomassaro commented 6 years ago

Reviewed 53 of 53 files at r1. Review status: all files reviewed at latest revision, 11 unresolved discussions.


lib/software/action/virus.ex, line 14 at r1 (raw file):

    {:ok, Virus.t, [VirusInstalledEvent.t]}
    | {:error, VirusInstallFailedEvent.reason, [VirusInstallFailedEvent.t]}
  def install(file, entity_id) do

docme


lib/software/action/flow/file.ex, line 65 at r1 (raw file):

        {:error, :not_executable}

      :generic_install ->

comment or mention on the doc


lib/software/event/virus.ex, line 58 at r1 (raw file):

        do: %{account: event.entity_id}
    end
    # TODO: log

implement now or create issue


lib/software/event/file/install.ex, line 6 at r1 (raw file):


  event Processed do

docme


lib/software/event/file/install.ex, line 19 at r1 (raw file):

        file: File.t,
        entity_id: Entity.id,
        backend: term  # TODO

add type


lib/software/henforcer/file.ex, line 85 at r1 (raw file):

    {true, is_virus_relay}
    | is_virus_error
  def is_virus?(file_id = %File.ID{}) do

docme


lib/software/internal/file.ex, line 19 at r1 (raw file):

    if file do
      file
      |> format()

one line


lib/software/internal/file/meta.ex, line 2 at r1 (raw file):

defmodule Helix.Software.Internal.File.Meta do

doc how File.meta works


lib/software/internal/file/meta.ex, line 19 at r1 (raw file):

    do: file

    @spec virus_metadata(File.t) ::

indent


lib/software/process/file/install.ex, line 4 at r1 (raw file):


process Helix.Software.Process.File.Install do

docme


lib/software/public/file.ex, line 90 at r1 (raw file):

  end

  def install(file = %File{}, gateway, target, backend, network_id, relay) do

spec + doc


Comments from Reviewable

renatomassaro commented 6 years ago

Reviewed 10 of 10 files at r2. Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

sourcelevel-bot[bot] commented 6 years ago

Ebert has finished reviewing this Pull Request and has found:

You can see more details about this review at https://ebertapp.io/github/HackerExperience/Helix/pulls/365.